Skip to content

Replace CONFIGURE_DEPENDS with BOOST_CONFIGURE_DEPENDS - #357

Open
cdglove wants to merge 1 commit into
boostorg:developfrom
cdglove:develop
Open

cdglove wants to merge 1 commit into
boostorg:developfrom
cdglove:develop

Conversation

@cdglove

@cdglove cdglove commented Oct 30, 2026

Copy link
Copy Markdown

When file(GLOB ... CONFIGURE_DEPENDS) or file(GLOB_RECURSE ... CONFIGURE_DEPENDS) is evaluated, CMake's make style generators create a verification script (VerifyGlobs.cmake) that gets run on every build, outputting "Re-checking globbed directories....". This can cause a a noticeable delay on incremental builds.

Since the headers are only needed for IDE project navigation, limiting this check to that use case is a good compromise.

@sehe

sehe commented Oct 30, 2026

Copy link
Copy Markdown

I asked a question about the validity of the reasoning here boostorg/assert#49 (comment)

@cmazakas

Copy link
Copy Markdown
Member

@cdglove I don't understand how this is a problem. Are you using Boost as a subdirectory? Try cmake --install and then find_package().

@cdglove

cdglove commented Oct 30, 2026

Copy link
Copy Markdown
Author

I'm using it like this:

FetchContent_Declare(
  Boost
  SYSTEM 
  OVERRIDE_FIND_PACKAGE 
  EXCLUDE_FROM_ALL
  URL https://github.com/boostorg/boost/releases/download/boost-1.92.0/boost-1.92.0-cmake.tar.xz
  URL_HASH MD5=542f895860ceb7a99c9aa4d02f6073c8
  DOWNLOAD_EXTRACT_TIMESTAMP True)

FetchContent_MakeAvailable(Boost)

And consuming it like this:

target_link_libraries(mytarget
  PUBLIC 
    Boost::describe
    Boost::stl_interfaces 
    Boost::serialization 
    Boost::filesystem 
  PRIVATE 
    Boost::nowide
)

When one does this, it re-runs every GLOB in every file whether the library is being consumed or not.

See my related post on the mailing list:
https://lists.boost.org/archives/list/boost@lists.boost.org/thread/LKPFNC3AMPIVWRAE75EFMYRMS6AL6MV4/

Allows projects building boost via add_subdirectory to avoid the cost
of GLOB on every build.
@cdglove cdglove changed the title Only GLOB headers when generating Visual Studio projects Replace CONFIGURE_DEPENDS with BOOST_CONFIGURE_DEPENDS Oct 31, 2026
@cdglove

cdglove commented Nov 1, 2026

Copy link
Copy Markdown
Author

Updated as per discussion on the mailing list and integrated into the assert library.

https://lists.boost.org/archives/list/boost@lists.boost.org/thread/LKPFNC3AMPIVWRAE75EFMYRMS6AL6MV4/

boostorg/assert#49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants