We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2979b8 commit 2c6a2fdCopy full SHA for 2c6a2fd
CMakeLists.txt
@@ -5,7 +5,14 @@ set(CMAKE_CXX_STANDARD 17)
5
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
set(CMAKE_C_STANDARD 99)
7
set(CMAKE_C_STANDARD_REQUIRED ON)
8
-
+include(CheckCXXCompilerFlag)
9
+unset(FASTPFOR_COMPILER_SUPPORTS_MARCH_NATIVE CACHE)
10
+CHECK_CXX_COMPILER_FLAG(-march=native FASTPFOR_COMPILER_SUPPORTS_MARCH_NATIVE)
11
+if(FASTPFOR_COMPILER_SUPPORTS_MARCH_NATIVE)
12
+ add_compile_options(-march=native)
13
+else()
14
+ message(STATUS "native target not supported")
15
+endif()
16
if (NOT CMAKE_BUILD_TYPE)
17
message(STATUS "No build type selected, default to Release")
18
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
0 commit comments