--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -546,7 +546,7 @@ macro(TEST_SSE_SUPPORT
 
   # message(STATUS "Detecting SSE support")
   if(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
-    set(${_sse42_flags} "-march=x86-64-v2")
+    set(${_sse42_flags} "-msse4.2")
   elseif(MSVC)
     # msvc has no specific build flags for SSE42, but when using intrinsics it will
     # generate the right instructions.
