CMake: Fix CMAKE_CONFIGURATION_TYPES not being set properly in the cache

This commit is contained in:
rdb 2020-12-21 23:31:20 +01:00
parent 1070299a9d
commit f26f7d2226
2 changed files with 1 additions and 4 deletions

View File

@ -40,6 +40,7 @@ endif()
if(IS_MULTICONFIG) if(IS_MULTICONFIG)
message(STATUS "Using multi-configuration generator") message(STATUS "Using multi-configuration generator")
set(CMAKE_CONFIGURATION_TYPES "${_configs}" CACHE STRING "")
else() else()
# Set the default CMAKE_BUILD_TYPE before calling project(). # Set the default CMAKE_BUILD_TYPE before calling project().
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)

View File

@ -29,10 +29,6 @@ if(DEFINED CMAKE_CXX_FLAGS_COVERAGE)
list(APPEND _configs Coverage) list(APPEND _configs Coverage)
endif() endif()
if(IS_MULTICONFIG)
set(CMAKE_CONFIGURATION_TYPES ${_configs})
endif()
# Are we building with static or dynamic linking? # Are we building with static or dynamic linking?
option(BUILD_SHARED_LIBS option(BUILD_SHARED_LIBS
"Causes subpackages to be built separately -- setup for dynamic linking. "Causes subpackages to be built separately -- setup for dynamic linking.