|
@@ -18,7 +18,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "-fopenmp")
|
|
|
|
|
|
# optimization flags support
|
|
|
-if(CMAKE_BUILD_TYPE MATCHES Release)
|
|
|
+if(CMAKE_BUILD_TYPE MATCHES Debug)
|
|
|
+ add_definitions(-DCHECK_STRICTMOD)
|
|
|
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
|
|
|
+else()
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3")
|
|
|
foreach(FLAG -march=native -mtune=native -funroll-loops)
|
|
|
string(REGEX REPLACE -= _ FLAG_ID ${FLAG})
|
|
@@ -30,8 +33,5 @@ if(CMAKE_BUILD_TYPE MATCHES Release)
|
|
|
if(APPLE)
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse -Wa,-q")
|
|
|
endif()
|
|
|
-else()
|
|
|
- add_definitions(-DCHECK_STRICTMOD)
|
|
|
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
|
|
|
endif()
|
|
|
|