summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2017-12-29 20:33:11 (GMT)
committerCraig Scott <craig.scott@crascit.com>2017-12-29 22:35:56 (GMT)
commit3c413e2a31b4fcb6a99dba04669c6a6517b97832 (patch)
tree0e3f6f6776b682f43654f948886e34d482441aa2 /Modules/FindBoost.cmake
parentc267ea1c3e54626e4ab2283dc7529ed8aa8beac8 (diff)
downloadCMake-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/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake11
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 0786248..a0fd90f 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -275,13 +275,14 @@ endif()
macro(_Boost_ADJUST_LIB_VARS basename)
if(Boost_INCLUDE_DIR )
if(Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
- # if the generator supports configuration types then set
- # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- if(CMAKE_CONFIGURATION_TYPES 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
+ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ if(_isMultiConfig OR CMAKE_BUILD_TYPE)
set(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
else()
- # if there are no configuration types and CMAKE_BUILD_TYPE has no value
- # then just use the release libraries
+ # For single-config generators where CMAKE_BUILD_TYPE has no value,
+ # just use the release libraries
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
endif()
# FIXME: This probably should be set for both cases