avoid enabling sse if not supported
This commit is contained in:
@@ -46,7 +46,16 @@ if(WIN32)
|
|||||||
add_definitions(-DNOMINMAX)
|
add_definitions(-DNOMINMAX)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
endif ()
|
endif ()
|
||||||
add_compile_options(-mssse3 -msse4.1)
|
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
|
||||||
|
check_c_compiler_flag(-mssse3 HAS_SSSE3)
|
||||||
|
check_c_compiler_flag(-msse4.1 HAS_SSE4_1)
|
||||||
|
|
||||||
|
if (HAS_SSSE3 AND HAS_SSE4_1)
|
||||||
|
add_compile_options(-mssse3 -msse4.1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||||
#add_compile_options(-fsanitize=address -fsanitize=undefined)
|
#add_compile_options(-fsanitize=address -fsanitize=undefined)
|
||||||
#add_link_options(-fsanitize=address -fsanitize=undefined)
|
#add_link_options(-fsanitize=address -fsanitize=undefined)
|
||||||
|
|||||||
Reference in New Issue
Block a user