CMake: Add DISABLE_SSE4 option
NOT recommended. Only if you ABSOLUTELY need it. The SSE2/legacy build will be a separate download option, and warn you if you try to run it on a CPU that supports SSE4.
This commit is contained in:
@ -69,7 +69,7 @@ function(detect_architecture)
|
||||
CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message(STATUS "Building x86_64 binaries.")
|
||||
set(CPU_ARCH_X64 TRUE PARENT_SCOPE)
|
||||
if(NOT MSVC OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
if(NOT MSVC OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT DISABLE_SSE4)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.1" PARENT_SCOPE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user