diff --git a/include/xsimd/arch/xsimd_scalar.hpp b/include/xsimd/arch/xsimd_scalar.hpp index 9066da656..3e6f3b5ab 100644 --- a/include/xsimd/arch/xsimd_scalar.hpp +++ b/include/xsimd/arch/xsimd_scalar.hpp @@ -520,7 +520,7 @@ namespace xsimd { return ::exp10(x); } -#elif defined(_WIN32) +#elif defined(_WIN32) || defined(EMSCRIPTEN) template ::value>::type> inline T exp10(const T& x) noexcept { diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7bb1fdc0e..ff6da76d5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -209,9 +209,9 @@ add_subdirectory(doc) if(EMSCRIPTEN) set_target_properties(test_xsimd PROPERTIES LINK_FLAGS "-s MODULARIZE=1 -s EXPORT_NAME=test_xsimd_wasm -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -lembind") - # target_compile_options(test_xsimd - # PUBLIC --std=c++17 - # PUBLIC "SHELL: -msimd128" - # PUBLIC "SHELL: -msse2" - # ) + target_compile_options(test_xsimd + PUBLIC --std=c++14 + PUBLIC "SHELL: -msimd128" + PUBLIC "SHELL: -msse2" + ) endif() diff --git a/test/test_power.cpp b/test/test_power.cpp index dd0c762df..d63bdc153 100644 --- a/test/test_power.cpp +++ b/test/test_power.cpp @@ -82,7 +82,8 @@ struct power_test INFO("pow"); CHECK_EQ(diff, 0); -#ifdef __SSE__ +// use of undeclared identifier '_MM_SET_EXCEPTION_MASK for emscripten +#if defined(__SSE__) && !defined(EMSCRIPTEN) // Test with FE_INVALID... unsigned mask = _MM_GET_EXCEPTION_MASK(); _MM_SET_EXCEPTION_MASK(mask & ~_MM_MASK_INVALID);