Skip to content

Commit 37aebd9

Browse files
authored
Merge branch 'master' into add_algorithm
2 parents 6d52bd4 + 2c6a2fd commit 37aebd9

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
mkdir build &&
1818
cd build &&
1919
cmake .. &&
20-
cmake --build .
20+
cmake --build .

CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,20 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
88

99
cmake_policy(SET CMP0169 OLD) # Prevent warning when using FetchContent_Populate
1010

11+
include(CheckCXXCompilerFlag)
12+
unset(FASTPFOR_COMPILER_SUPPORTS_MARCH_NATIVE CACHE)
13+
CHECK_CXX_COMPILER_FLAG(-march=native FASTPFOR_COMPILER_SUPPORTS_MARCH_NATIVE)
14+
if(FASTPFOR_COMPILER_SUPPORTS_MARCH_NATIVE)
15+
add_compile_options(-march=native)
16+
else()
17+
message(STATUS "native target not supported")
18+
endif()
19+
1120
if (NOT CMAKE_BUILD_TYPE)
1221
message(STATUS "No build type selected, default to Release")
1322
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
1423
endif()
1524
include(cmake/CPM.cmake)
16-
add_subdirectory(dependencies)
1725

18-
add_subdirectory(benchmarks)
26+
add_subdirectory(dependencies)
27+
add_subdirectory(benchmarks)

0 commit comments

Comments
 (0)