Skip to content

Commit

Permalink
optimization option
Browse files Browse the repository at this point in the history
  • Loading branch information
rvianello committed Apr 9, 2016
1 parent e6054ae commit 564ac1a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ target_link_libraries(chemicalite

add_subdirectory(examples)

option(CHEMICALITE_ENABLE_NATIVE_OPT
"enable compiler optimization for the native architecture" ON)
option(CHEMICALITE_ENABLE_TESTS "enable tests" ON)
option(CHEMICALITE_ENABLE_PYTHON_TESTS "enable python tests" ON)

Expand All @@ -37,11 +39,9 @@ if (CHEMICALITE_ENABLE_TESTS)
endif (CHEMICALITE_ENABLE_PYTHON_TESTS)
endif (CHEMICALITE_ENABLE_TESTS)

if (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=native")
set(CMAKE_C_FLAGS_RELWITHDEBINFO
"${CMAKE_C_FLAGS_RELWITHDEBINFO} -march=native")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=native")
endif (CMAKE_COMPILER_IS_GNUCC)
if (CHEMICALITE_ENABLE_NATIVE_OPT)
if (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
endif (CMAKE_COMPILER_IS_GNUCC)
endif (CHEMICALITE_ENABLE_NATIVE_OPT)

0 comments on commit 564ac1a

Please sign in to comment.