diff --git a/CMakeLists.txt b/CMakeLists.txt index f5f03be4d3..a31aea48cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,6 @@ endif() if(IS_MULTICONFIG) message(STATUS "Using multi-configuration generator") - set(CMAKE_CONFIGURATION_TYPES ${_configs}) else() # Set the default CMAKE_BUILD_TYPE before calling project(). if(NOT CMAKE_BUILD_TYPE) diff --git a/dtool/Config.cmake b/dtool/Config.cmake index 1b04a19936..1835ba6fd5 100644 --- a/dtool/Config.cmake +++ b/dtool/Config.cmake @@ -22,6 +22,17 @@ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") set(IS_FREEBSD 1) endif() +# Define the type of build we are setting up. + +set(_configs Standard Release RelWithDebInfo Debug MinSizeRel) +if(DEFINED CMAKE_CXX_FLAGS_COVERAGE) + list(APPEND _configs Coverage) +endif() + +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES ${_configs}) +endif() + set(PER_CONFIG_OPTIONS) # Are we building with static or dynamic linking?