fix(cmake): Use RelWithDebInfo as default build type
This commit is contained in:
parent
248f00f55b
commit
5c561e3d77
@ -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
|
||||
|
@ -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++")
|
||||
|
Loading…
Reference in New Issue
Block a user