Skip to content

Commit

Permalink
Use "-march=native" as default
Browse files Browse the repository at this point in the history
Every user can set custom value by passing '-DEXTRA_FLAGS=-march=...' to cmake

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
  • Loading branch information
martin-g committed Nov 2, 2022
1 parent 092d42a commit e0cd07a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")

if(NOT DEFINED EXTRA_FLAGS)
set(EXTRA_FLAGS "-march=haswell" CACHE STRING
set(EXTRA_FLAGS "-march=native" CACHE STRING
"Extra compilation flags for C and CXX." FORCE)
endif()

Expand Down

0 comments on commit e0cd07a

Please sign in to comment.