summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2019-12-19 16:54:27 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2020-01-14 22:45:22 (GMT)
commit85cd26b8a65ea9ff91a0c2e42858a653198e7c23 (patch)
treecad79040b9d18522d9495d758dc7643074678351 /Modules/FindBoost.cmake
parent338c7916bab5977941fb409da8c155ba312365ea (diff)
downloadCMake-85cd26b8a65ea9ff91a0c2e42858a653198e7c23.zip
CMake-85cd26b8a65ea9ff91a0c2e42858a653198e7c23.tar.gz
CMake-85cd26b8a65ea9ff91a0c2e42858a653198e7c23.tar.bz2
FindBoost: only mark Boost_DIR as advanced if defined
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 0e84fab..deac9ef 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -248,6 +248,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# Save project's policies
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST
+cmake_policy(SET CMP0102 NEW) # if mark_as_advanced(non_cache_var)
function(_boost_get_existing_target component target_var)
set(names "${component}")
@@ -441,7 +442,9 @@ if (NOT Boost_NO_BOOST_CMAKE)
# 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)
- mark_as_advanced(Boost_DIR)
+ if (DEFINED Boost_DIR)
+ mark_as_advanced(Boost_DIR)
+ endif ()
# 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.