Skip to content

Commit ba67a87

Browse files
author
Julian LALU
committed
Fix compilation
1 parent da2fd40 commit ba67a87

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,11 @@ set_target_properties(${test_project_name}
380380
# GCC Clang -fconstexpr-ops-limit=4294967295 -fconstexpr-steps=4294967295
381381
# Clang-cl -Xclang -fconstexpr-steps=4294967295
382382
if(MSVC)
383-
target_compile_options( ${test_project_name} PRIVATE /Zc:__cplusplus /bigobj /permissive- /EHsc /utf-8 /arch:AVX2 )
383+
384+
target_compile_options( ${test_project_name} PRIVATE /Zc:__cplusplus /bigobj /permissive- /EHsc /utf-8 /arch:AVX2 /constexpr:steps2147483647 /constexpr:depth32767)
385+
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
386+
target_compile_options( ${test_project_name} PRIVATE -Xclang -fconstexpr-steps=2147483647)
387+
endif()
384388
# Define them only weh compiling with 64 bits
385389
target_compile_definitions(${test_project_name} PRIVATE __SSE__ __SSE2__ __SSSE3__ __AVX__ __AVX2__)
386390
elseif(EMSCRIPTEN)
@@ -390,9 +394,9 @@ elseif(EMSCRIPTEN)
390394
set_target_properties(${test_project_name} PROPERTIES SUFFIX ".js")
391395

392396
target_link_options(${test_project_name} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:-sASSERTIONS> "-sENVIRONMENT=[\"web\",\"node\"]" -sABORTING_MALLOC=0 -sALLOW_MEMORY_GROWTH=1 -sINITIAL_MEMORY=134217728)
393-
target_compile_options( ${test_project_name} PRIVATE -msse4.2 -msimd128)
397+
target_compile_options( ${test_project_name} PRIVATE -msse4.2 -msimd128 -fconstexpr-ops-limit=2147483647 -fconstexpr-steps=2147483647)
394398
else()
395-
target_compile_options( ${test_project_name} PRIVATE -msse4.2)
399+
target_compile_options( ${test_project_name} PRIVATE -msse4.2 -fconstexpr-ops-limit=2147483647 -fconstexpr-steps=2147483647)
396400
endif()
397401

398402
get_target_property(core_type ${lib_name} TYPE)

0 commit comments

Comments
 (0)