summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-22 14:29:51 (GMT)
committerBrad King <brad.king@kitware.com>2020-10-22 14:42:33 (GMT)
commitb32cb33275ecafe7465d30a46ce63a7fc25904f8 (patch)
tree877bc8f29f64ffcbe59fb9bad960fb0eac9f255d /Modules
parentec3b3d2c2f16397b9a40f79a9783f3d207088b93 (diff)
downloadCMake-b32cb33275ecafe7465d30a46ce63a7fc25904f8.zip
CMake-b32cb33275ecafe7465d30a46ce63a7fc25904f8.tar.gz
CMake-b32cb33275ecafe7465d30a46ce63a7fc25904f8.tar.bz2
FindBoost: Honor Boost_NO_SYSTEM_PATHS when finding upstream BoostConfig
Issue: #21200
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBoost.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 6154dd6..f27666d 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -442,10 +442,15 @@ if (NOT Boost_NO_BOOST_CMAKE)
endif()
endif()
+ set(_boost_FIND_PACKAGE_ARGS "")
+ if(Boost_NO_SYSTEM_PATHS)
+ list(APPEND _boost_FIND_PACKAGE_ARGS NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+ endif()
+
# Do the same find_package call but look specifically for the CMake version.
# Note that args are passed in the Boost_FIND_xxxxx variables, so there is no
# need to delegate them to this find_package call.
- find_package(Boost QUIET NO_MODULE)
+ find_package(Boost QUIET NO_MODULE ${_boost_FIND_PACKAGE_ARGS})
if (DEFINED Boost_DIR)
mark_as_advanced(Boost_DIR)
endif ()