diff options
Diffstat (limited to 'Modules/CMakeCommonLanguageInclude.cmake')
-rw-r--r-- | Modules/CMakeCommonLanguageInclude.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake index 418860e..43b5da0 100644 --- a/Modules/CMakeCommonLanguageInclude.cmake +++ b/Modules/CMakeCommonLanguageInclude.cmake @@ -17,11 +17,13 @@ foreach(t EXE SHARED MODULE STATIC) endforeach() if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) -# default build type is none - if(NOT CMAKE_NO_BUILD_TYPE) + get_property(_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + # default build type is none + if(NOT _GENERATOR_IS_MULTI_CONFIG AND NOT CMAKE_NO_BUILD_TYPE) set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") endif() + unset(_GENERATOR_IS_MULTI_CONFIG) set (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING "Flags used by the linker during debug builds.") |