Skip to content

Commit

Permalink
Use add_compile_options; Remove CMAKE_CXX_FLAGS_CUSTOM.
Browse files Browse the repository at this point in the history
  • Loading branch information
mnijhuis-tos committed Jul 8, 2020
1 parent 3906b7a commit a5d97fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ project(DP3)

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3")
add_compile_options(-Wall -O3)

if(NOT PORTABLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
add_compile_options(-march=native)
endif()

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED YES)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_CUSTOM}")
include(CTest)
enable_testing()

Expand Down

0 comments on commit a5d97fe

Please sign in to comment.