diff options
author | Chris Robinson <[email protected]> | 2012-08-15 03:43:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-08-15 03:43:36 -0700 |
commit | 4d157d2849a6cda4fb05eea7ebed91793985b709 (patch) | |
tree | baa06a85fe0f4e7b859c21cde4d8dee7afbf6577 /CMakeLists.txt | |
parent | 64cd763e190eeff0f0631babebc150893e5f3ecf (diff) |
Make sure the working coefficients are aligned for the SSE mixer
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fdee264e..f2265b87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,7 @@ SET(LIB_MINOR_VERSION "14") SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}") SET(EXPORT_DECL "") +SET(ALIGN_DECL "") CHECK_TYPE_SIZE("long" SIZEOF_LONG) @@ -173,6 +174,7 @@ ENDIF() # Set visibility/export options if available IF(WIN32) SET(EXPORT_DECL "__declspec(dllexport)") + SET(ALIGN_DECL "__declspec(aligned((x)))") OPTION(WINE "Enable use of Wine headers when compiling" OFF) IF(WINE) @@ -218,6 +220,12 @@ ELSE() ENDIF() ENDIF() + CHECK_C_SOURCE_COMPILES("int foo __attribute__((aligned(16))); + int main() {return 0;}" HAVE_ATTRIBUTE_ALIGNED) + IF(HAVE_ATTRIBUTE_ALIGNED) + SET(ALIGN_DECL "__attribute__((aligned((x))))") + ENDIF() + SET(CMAKE_REQUIRED_FLAGS "${OLD_REQUIRED_FLAGS}") ENDIF() |