diff --git a/CMakeLists.txt b/CMakeLists.txt index ca03586..67fa06f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,11 +74,14 @@ if(EMSCRIPTEN) endif() if(NOT USE_SIMD_FALLBACK) + cmake_push_check_state() + list(APPEND CMAKE_REQUIRED_FLAGS -msimd128) check_include_file_cxx("wasm_simd128.h" HAS_WASM_SIMD) if(HAS_WASM_SIMD) - add_compile_definitions(HAS_WASM_SIMD) add_compile_options(-msimd128) + add_compile_definitions(HAS_WASM_SIMD) endif() + cmake_pop_check_state() cmake_push_check_state() list(APPEND CMAKE_REQUIRED_FLAGS -mavx)