From 12f95cf4b62e554bc2d80687a8aa5cda1bd66a4b Mon Sep 17 00:00:00 2001 From: Chris Glover Date: Sat, 31 Oct 2026 21:51:46 +0000 Subject: [PATCH] Add BOOST_CONFIGURE_DEPENDS CMake variable BOOST_CONFIGURE_DEPENDS expands to CONFIGURE_DEPENDS by default when building boost as the root project. Otherwise expands to nothing. Allows individual libraries to use BOOST_CONFIGURE_DEPENDS in place of CONFIGURE_DEPENDS so that projects building boost via add_subdirectory don;'t incur the cost of GLOB on every rebuild. --- include/BoostRoot.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/BoostRoot.cmake b/include/BoostRoot.cmake index 25bcbc4..c367896 100644 --- a/include/BoostRoot.cmake +++ b/include/BoostRoot.cmake @@ -99,6 +99,12 @@ if(CMAKE_SOURCE_DIR STREQUAL Boost_SOURCE_DIR) option(CMAKE_VISIBILITY_INLINES_HIDDEN "Inline function have hidden visibility" ON) + # Sub-projects should use BOOST_CONFIGURE_DEPENDS in place of CONFIGURE_DEPENDS + # so that projects consuming boost through add_subdirectory don't incur the cost + # of GLOB on every build. + + set(BOOST_CONFIGURE_DEPENDS CONFIGURE_DEPENDS) + # Enable IDE folders for Visual Studio set_property(GLOBAL PROPERTY USE_FOLDERS ON)