We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01cd769 commit 817d2c9Copy full SHA for 817d2c9
CMakeLists.txt
@@ -28,6 +28,11 @@ if(NOT CMAKE_BUILD_TYPE)
28
set(CMAKE_BUILD_TYPE Release)
29
endif()
30
31
+check_cxx_compiler_flag("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
32
+if(COMPILER_SUPPORTS_MARCH_NATIVE)
33
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
34
+endif()
35
+
36
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
37
check_cxx_compiler_flag("/O2" CXX_FLAG_O2)
38
check_cxx_compiler_flag("/Oy" CXX_FLAG_Oy)
0 commit comments