diff --git a/cmake/build/core.cmake b/cmake/build/core.cmake index 957f56ea..d16fe028 100644 --- a/cmake/build/core.cmake +++ b/cmake/build/core.cmake @@ -10,8 +10,8 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Set default build type if not specified if(NOT CMAKE_BUILD_TYPE) - message_colored(STATUS "No build type specified; using Release" 33) - set(CMAKE_BUILD_TYPE "Release") + message_colored(STATUS "No build type specified; using RelWithDebInfo" 33) + set(CMAKE_BUILD_TYPE "RelWithDebInfo") endif() # Compiler flags diff --git a/cmake/build/summary.cmake b/cmake/build/summary.cmake index af71bc52..d7bf7cc7 100644 --- a/cmake/build/summary.cmake +++ b/cmake/build/summary.cmake @@ -12,7 +12,11 @@ function(colored_option message_level text var color_on color_off) endfunction() message(STATUS "--------------------------") -message_colored(STATUS " Build type: ${CMAKE_BUILD_TYPE}" "32;1") +if(CMAKE_BUILD_TYPE) + message_colored(STATUS " Build type: ${CMAKE_BUILD_TYPE}" "32;1") +else() + message_colored(STATUS " Build type: NONE" "33;1") +endif() message(STATUS " Compiler C: ${CMAKE_C_COMPILER}") message(STATUS " Compiler C++: ${CMAKE_CXX_COMPILER}") message(STATUS " Compiler flags: ${CMAKE_CXX_FLAGS}") @@ -36,7 +40,9 @@ elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL "relwithdebinfo") message(STATUS " relwithdebinfo: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") endif() -message(STATUS " Linker flags: ${CMAKE_EXE_LINKER_FLAGS}") +if(CMAKE_EXE_LINKER_FLAGS) + message(STATUS " Linker flags: ${CMAKE_EXE_LINKER_FLAGS}") +endif() if(CXXLIB_CLANG) message(STATUS " C++ library: libc++")