Skip to content

Commit

Permalink
FindBoost: Make imported targets fall back to Release
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ComicSansMS authored and bradking committed Jun 20, 2016
1 parent 313e966 commit c9fca42
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Modules/FindBoost.cmake
Expand Up @@ -1734,20 +1734,20 @@ 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)
set_target_properties(Boost::${COMPONENT} PROPERTIES
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})
Expand Down

0 comments on commit c9fca42

Please sign in to comment.