Tuned CMake messages
authorkhizmax <khizmax@gmail.com>
Thu, 16 Jun 2016 14:09:26 +0000 (17:09 +0300)
committerkhizmax <khizmax@gmail.com>
Thu, 16 Jun 2016 14:09:26 +0000 (17:09 +0300)
CMakeLists.txt

index 8ebef3f..e2b929f 100644 (file)
@@ -85,7 +85,11 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
 
 message("Build type -- ${CMAKE_BUILD_TYPE}")
 message("Compiler version: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
-message("Compiler flags: ${CMAKE_CXX_FLAGS}")
+if (CMAKE_BUILD_TYPE MATCHES Debug)
+  message("Compiler flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
+else()
+  message("Compiler flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
+endif()
 
 include_directories(${PROJECT_SOURCE_DIR})