BUILD(cmake): Print out build type

In addition to Mumble's version and the target architecture, also print
the used build type.
This commit is contained in:
Robert Adam 2020-09-01 11:05:15 +02:00
parent 385341937c
commit 968f320322

View File

@ -59,15 +59,20 @@ get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(IS_MULTI_CONFIG)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
set(BUILD_STR "<mulit-config>")
else()
# We set the CMake configuration to "Release", in case it's not set.
if(NOT CMAKE_BUILD_TYPE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE "Release")
set(BUILD_STR "Release")
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_definitions(
"-DDEBUG"
"-DSNAPSHOT_BUILD"
)
set(BUILD_STR "Debug")
elseif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release")
message(FATAL_ERROR "Unsupported build type! Please choose either \"Debug\" or \"Release\".")
endif()
@ -85,6 +90,7 @@ endif()
message(STATUS "##################################################")
message(STATUS "Mumble version: ${version}")
message(STATUS "Architecture: ${ARCH}")
message(STATUS "Build type: ${BUILD_STR}")
message(STATUS "##################################################")
add_subdirectory(src)