summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorAlexander Grund <alexander.grund@tu-dresden.de>2019-06-11 12:52:32 (GMT)
committerBrad King <brad.king@kitware.com>2019-06-18 12:25:14 (GMT)
commite4181eeaf2c6f5204443177fe71176ed94977c1b (patch)
tree150fe27452547cf7a373c1402c76a141f673e352 /Modules/FindBoost.cmake
parent4cb652e1d35d5ea98cde36b8a877e43ad3e71a0d (diff)
downloadCMake-e4181eeaf2c6f5204443177fe71176ed94977c1b.zip
CMake-e4181eeaf2c6f5204443177fe71176ed94977c1b.tar.gz
CMake-e4181eeaf2c6f5204443177fe71176ed94977c1b.tar.bz2
FindBoost: Don't overwrite Boost_${_comp}_FOUND
Is set in Boost >= 1.71 so don't overwrite it
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake12
1 files changed, 7 insertions, 5 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index a059589..93de609 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -276,15 +276,17 @@ if (NOT Boost_NO_BOOST_CMAKE)
# If we found a boost cmake package, then we're done. Print out what we found.
# Otherwise let the rest of the module try to find it.
if(Boost_FOUND)
- # Neither the legacy boost-cmake nor the new builtin BoostConfig (as in 1.70)
- # report the found components in the standard variables, so we need to convert
- # them here
+ # Convert component found variables to standard variables if required
+ # Necessary for legacy boost-cmake and 1.70 builtin BoostConfig
if(Boost_FIND_COMPONENTS)
foreach(_comp IN LISTS Boost_FIND_COMPONENTS)
+ if(DEFINED Boost_${_comp}_FOUND)
+ continue()
+ endif()
string(TOUPPER ${_comp} _uppercomp)
- if(DEFINED Boost${_comp}_FOUND)
+ if(DEFINED Boost${_comp}_FOUND) # legacy boost-cmake project
set(Boost_${_comp}_FOUND ${Boost${_comp}_FOUND})
- elseif(DEFINED Boost_${_uppercomp}_FOUND)
+ elseif(DEFINED Boost_${_uppercomp}_FOUND) # Boost 1.70
set(Boost_${_comp}_FOUND ${Boost_${_uppercomp}_FOUND})
endif()
endforeach()