Skip to content

Add BOOST_CONFIGURE_DEPENDS CMake variable - #108

Merged
pdimov merged 1 commit into
boostorg:developfrom
cdglove:develop
Nov 1, 2026
Merged

pdimov merged 1 commit into
boostorg:developfrom
cdglove:develop

Conversation

@cdglove

@cdglove cdglove commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

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.

@cdglove

cdglove commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

As discussed on the mailing list. I've also updated the original PRs:

boostorg/assert#49
boostorg/unordered#357
boostorg/openmethod#138
boostorg/static_string#83
boostorg/json#1217
boostorg/url#1015

Tested locally on MacOS by building boost with CMake standalone and as part of a larger project through FetchContent_Declare.

Comment thread include/BoostRoot.cmake Outdated
# so that projects consuming boost through add_subdirectory don't incur the cost
# of GLOB on every build.

if(NOT DEFINED BOOST_CONFIGURE_DEPENDS)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this check is necessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you OK with it being a cache variable instead so it can be overridden from command line? Existing precedent isn't super clear to me so I just kind of copied what was here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I want this overridable. It should be set unconditionally to "CONFIGURE_DEPENDS" when root project, and "" when not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

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.
@pdimov
pdimov merged commit a7e13ad into boostorg:develop Nov 1, 2026
590 of 645 checks passed
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.

2 participants