Hello,

The recent development to support different LIBRARY_DIR for Boost have made the new cache entries appear in the default cache.

I have searched in the code history of the FindBoost.cmake file to find why the old Boost_LIBRARY_DIR was "marked" as advanced while the new ones do not, ... and I failed. Especially, I couldn't find any mark_as_advanced(Boost_LIBRARY_DIR) that was not reported to the new variables I am guessing either there is something weird, a bug elsewhere or I'm most likely missing something.
If someone is able to find the explanation it would be nice.

Anyway, here is a patch that marks the new variables as advanced.
But, depending on the answer to my history related interrogation it may not be the best patch to fix the issue.

Sylvain
>From feeebe8666883eab6b638ce7771a015ea229d503 Mon Sep 17 00:00:00 2001
From: Sylvain Joubert <[email protected]>
Date: Sat, 30 May 2015 15:32:03 +0200
Subject: [PATCH] FindBoost: Mark Boost_LIBRARY_DIR_[RELEASE,DEBUG] cache
 entries as advanced

---
 Modules/FindBoost.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index c844aed..21883eb 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -330,6 +330,7 @@ macro(_Boost_FIND_LIBRARY var build_type)
     if(NOT Boost_LIBRARY_DIR_${build_type})
       get_filename_component(_dir "${${var}}" PATH)
       set(Boost_LIBRARY_DIR_${build_type} "${_dir}" CACHE PATH "Boost library directory ${build_type}" FORCE)
+      mark_as_advanced(Boost_LIBRARY_DIR_${build_type})
     endif()
   elseif(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
     # Try component-specific hints but do not save Boost_LIBRARY_DIR_[RELEASE,DEBUG].
-- 
2.1.4

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to