diff --git a/CMakeLists.txt b/CMakeLists.txt index a70ba633dc..995d0847f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -417,6 +417,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC") else() message(STATUS "Checking for c-compiler flag: -msse4.2") check_c_compiler_flag(-msse4.2 HAVE_SSE4_2) + if(HAVE_SSE4_2) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2") + endif() endif() check_c_compiler_flag(-fvisibility=hidden FVHIDDEN)