aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-05 13:53:07 -0700
committerChris Robinson <[email protected]>2014-05-05 13:53:07 -0700
commit2edd04717838bee32e2ecc9a1939b9c54ae979e7 (patch)
tree3e4f5f95fc78751d3a2333e5f075523cc6ed3c28 /CMakeLists.txt
parent2bc16e9947d02e06330438dd6bf0446133c1f01f (diff)
C11's alignas is also sufficient for SSE aligning
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f1674a5..616a1999 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -537,14 +537,16 @@ OPTION(ALSOFT_REQUIRE_SSE "Require SSE/SSE2 support" OFF)
CHECK_INCLUDE_FILE(xmmintrin.h HAVE_XMMINTRIN_H "${SSE_SWITCH}")
IF(HAVE_XMMINTRIN_H)
OPTION(ALSOFT_CPUEXT_SSE "Enable SSE/SSE2 support" ON)
- IF(ALSOFT_CPUEXT_SSE AND ALIGN_DECL)
- SET(HAVE_SSE 1)
- SET(ALC_OBJS ${ALC_OBJS} Alc/mixer_sse.c)
- IF(SSE_SWITCH)
- SET_SOURCE_FILES_PROPERTIES(Alc/mixer_sse.c PROPERTIES
- COMPILE_FLAGS "${SSE_SWITCH}")
+ IF(ALSOFT_CPUEXT_SSE)
+ IF(ALIGN_DECL OR HAVE_C11_ALIGNAS)
+ SET(HAVE_SSE 1)
+ SET(ALC_OBJS ${ALC_OBJS} Alc/mixer_sse.c)
+ IF(SSE_SWITCH)
+ SET_SOURCE_FILES_PROPERTIES(Alc/mixer_sse.c PROPERTIES
+ COMPILE_FLAGS "${SSE_SWITCH}")
+ ENDIF()
+ SET(CPU_EXTS "${CPU_EXTS}, SSE")
ENDIF()
- SET(CPU_EXTS "${CPU_EXTS}, SSE")
ENDIF()
ENDIF()
IF(ALSOFT_REQUIRE_SSE AND NOT HAVE_SSE)