diff options
author | kcat <[email protected]> | 2021-05-13 15:13:00 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-13 15:13:00 -0700 |
commit | 8324471b8a7c674fc198dc296951ca7f6ddd4d54 (patch) | |
tree | 7dd6b32b988d2be595669ae6ea4d4cb47534bfa7 /CMakeLists.txt | |
parent | 1d7ff54f7de005faded1cc0568f3538c65bb4227 (diff) | |
parent | b40272d256442a02c1843a69114f470513062246 (diff) |
Merge pull request #559 from tatokis/split-sse-sse2
Allow enabling SSE without SSE2
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 007c2cdf..ce6be681 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,20 +370,25 @@ set(HAVE_SSE3 0) set(HAVE_SSE4_1 0) set(HAVE_NEON 0) -# Check for SSE+SSE2 support +# Check for SSE support option(ALSOFT_REQUIRE_SSE "Require SSE support" OFF) -option(ALSOFT_REQUIRE_SSE2 "Require SSE2 support" OFF) -if(HAVE_XMMINTRIN_H AND HAVE_EMMINTRIN_H) +if(HAVE_XMMINTRIN_H) option(ALSOFT_CPUEXT_SSE "Enable SSE support" ON) - option(ALSOFT_CPUEXT_SSE2 "Enable SSE2 support" ON) - if(ALSOFT_CPUEXT_SSE AND ALSOFT_CPUEXT_SSE2) + if(ALSOFT_CPUEXT_SSE) set(HAVE_SSE 1) - set(HAVE_SSE2 1) endif() endif() if(ALSOFT_REQUIRE_SSE AND NOT HAVE_SSE) message(FATAL_ERROR "Failed to enabled required SSE CPU extensions") endif() + +option(ALSOFT_REQUIRE_SSE2 "Require SSE2 support" OFF) +if(HAVE_EMMINTRIN_H) + option(ALSOFT_CPUEXT_SSE2 "Enable SSE2 support" ON) + if(HAVE_SSE AND ALSOFT_CPUEXT_SSE2) + set(HAVE_SSE2 1) + endif() +endif() if(ALSOFT_REQUIRE_SSE2 AND NOT HAVE_SSE2) message(FATAL_ERROR "Failed to enable required SSE2 CPU extensions") endif() @@ -794,9 +799,13 @@ set(ALC_OBJS # Include SIMD mixers set(CPU_EXTS "Default") +if(HAVE_SSE) + set(CORE_OBJS ${CORE_OBJS} core/mixer/mixer_sse.cpp) + set(CPU_EXTS "${CPU_EXTS}, SSE") +endif() if(HAVE_SSE2) - set(CORE_OBJS ${CORE_OBJS} core/mixer/mixer_sse.cpp core/mixer/mixer_sse2.cpp) - set(CPU_EXTS "${CPU_EXTS}, SSE, SSE2") + set(CORE_OBJS ${CORE_OBJS} core/mixer/mixer_sse2.cpp) + set(CPU_EXTS "${CPU_EXTS}, SSE2") endif() if(HAVE_SSE3) set(CORE_OBJS ${CORE_OBJS} core/mixer/mixer_sse3.cpp) |