Skip to content

Commit

Permalink
Check SSE support if CMake >= 3.10
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <[email protected]>
  • Loading branch information
sloretz authored and SeanCurtis-TRI committed Nov 5, 2020
1 parent 27a2f60 commit cbfe1e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set(FCL_TARGET_SUPPORT_X64_SSE OFF)
else()
set(FCL_TARGET_SUPPORT_X64_SSE ON)
cmake_host_system_information(RESULT _has_sse QUERY HAS_SSE)
cmake_host_system_information(RESULT _has_sse2 QUERY HAS_SSE2)
if(_has_sse AND _has_sse2)
set(FCL_TARGET_SUPPORT_X64_SSE ON)
else()
set(FCL_TARGET_SUPPORT_X64_SSE OFF)
endif()
endif()
set(SSE_FLAGS "")
option(FCL_USE_X64_SSE "Whether FCL should x64 SSE instructions" ${FCL_TARGET_SUPPORT_X64_SSE})
Expand Down

0 comments on commit cbfe1e9

Please sign in to comment.