Browse Source

CMake: Fix CMAKE_CONFIGURATION_TYPES not being set properly in the cache

rdb 5 years ago
parent
commit
f26f7d2226
2 changed files with 1 additions and 4 deletions
  1. 1 0
      CMakeLists.txt
  2. 0 4
      dtool/Config.cmake

+ 1 - 0
CMakeLists.txt

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

+ 0 - 4
dtool/Config.cmake

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