diff options
author | Craig Scott <craig.scott@crascit.com> | 2017-12-29 20:33:11 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2017-12-29 22:35:56 (GMT) |
commit | 3c413e2a31b4fcb6a99dba04669c6a6517b97832 (patch) | |
tree | 0e3f6f6776b682f43654f948886e34d482441aa2 /Modules/SelectLibraryConfigurations.cmake | |
parent | c267ea1c3e54626e4ab2283dc7529ed8aa8beac8 (diff) | |
download | CMake-3c413e2a31b4fcb6a99dba04669c6a6517b97832.zip CMake-3c413e2a31b4fcb6a99dba04669c6a6517b97832.tar.gz CMake-3c413e2a31b4fcb6a99dba04669c6a6517b97832.tar.bz2 |
GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Modules
Diffstat (limited to 'Modules/SelectLibraryConfigurations.cmake')
-rw-r--r-- | Modules/SelectLibraryConfigurations.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake index dce6f99..fe3bb00 100644 --- a/Modules/SelectLibraryConfigurations.cmake +++ b/Modules/SelectLibraryConfigurations.cmake @@ -38,11 +38,12 @@ macro( select_library_configurations basename ) set(${basename}_LIBRARY_DEBUG "${basename}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.") endif() + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE AND - ( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) ) - # if the generator supports configuration types or CMAKE_BUILD_TYPE - # is set, then set optimized and debug options. + ( _isMultiConfig OR CMAKE_BUILD_TYPE ) ) + # if the generator is multi-config or if CMAKE_BUILD_TYPE is set for + # single-config generators, set optimized and debug libraries set( ${basename}_LIBRARY "" ) foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE ) list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) |