summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorAndreas Weis <github@ghulbus-inc.de>2016-06-19 10:44:29 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-20 14:14:10 (GMT)
commitc9fca42fd1e14536d68bd600fc4c394d2630f7f5 (patch)
tree0a840ca940fd36c71e7126129826644deadccc6d /Modules/FindBoost.cmake
parent313e9667021a510151117d8222e958174b691261 (diff)
downloadCMake-c9fca42fd1e14536d68bd600fc4c394d2630f7f5.zip
CMake-c9fca42fd1e14536d68bd600fc4c394d2630f7f5.tar.gz
CMake-c9fca42fd1e14536d68bd600fc4c394d2630f7f5.tar.bz2
FindBoost: Make imported targets fall back to `Release`
FindBoost only detects Debug and Release configurations. All other configurations will fall back to the configuration listed as the first entry in `IMPORTED_CONFIGURATIONS`. Switch the order so that `Release` is listed first, as this is a better fallback than `Debug` for the `RelWithDebInfo` and `MinSizeRel` configurations. See issue #16091.
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 6bf6401..2560459 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1734,13 +1734,6 @@ if(Boost_FOUND)
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${Boost_${UPPERCOMPONENT}_LIBRARY}")
endif()
- if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}")
- set_property(TARGET Boost::${COMPONENT} APPEND PROPERTY
- IMPORTED_CONFIGURATIONS DEBUG)
- set_target_properties(Boost::${COMPONENT} PROPERTIES
- IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
- IMPORTED_LOCATION_DEBUG "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}")
- endif()
if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}")
set_property(TARGET Boost::${COMPONENT} APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
@@ -1748,6 +1741,13 @@ if(Boost_FOUND)
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LOCATION_RELEASE "${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}")
endif()
+ if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}")
+ set_property(TARGET Boost::${COMPONENT} APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(Boost::${COMPONENT} PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
+ IMPORTED_LOCATION_DEBUG "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}")
+ endif()
if(_Boost_${UPPERCOMPONENT}_DEPENDENCIES)
unset(_Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES)
foreach(dep ${_Boost_${UPPERCOMPONENT}_DEPENDENCIES})