[CMake] Why some libs use `CONFIGURE_DEPENDS`???
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cmake
- Domain
- build-system
Research direction
Start with boost/libs/static_string/CMakeLists.txt at line 57 and compare its CONFIGURE_DEPENDS usage with the boost::beast example, which limits the glob to non-library mode. Reproduce the generated CMakeFiles/VerifyGlobs.cmake during configuration, then trace which Boost library CMake files add these checks. Done means establishing whether third-party library globs should be excluded while preserving user-project glob checks.
Written by the indexing model from the issue text.
Description
It causes creation of ...\CMakeFiles\VerifyGlobs.cmake polluted with glob checks for certain boost libraries:
Spoiler
# CMAKE generated file: DO NOT EDIT!
# Generated by CMake Version 3.29
cmake_policy(SET CMP0009 NEW)
# BOOST_STATIC_STRING_HEADERS at C:/*/dev/boost/libs/static_string/CMakeLists.txt:57 (file)
file(GLOB_RECURSE NEW_GLOB LIST_DIRECTORIES false "C:/*/dev/boost/libs/static_string/include/boost/*.hpp")
set(OLD_GLOB
"C:/*/dev/boost/libs/static_string/include/boost/static_string.hpp"
"C:/*/dev/boost/libs/static_string/include/boost/static_string/config.hpp"
"C:/*/dev/boost/libs/static_string/include/boost/static_string/static_string.hpp"
)
if(NOT "${NEW_GLOB}" STREQUAL "${OLD_GLOB}")
message("-- GLOB mismatch!")
file(TOUCH_NOCREATE "C:/*/dev/bplan/out/build/msvc-dbg/CMakeFiles/cmake.verify_globs")
endif()
# BOOST_STATIC_STRING_HEADERS at C:/*/dev/boost/libs/static_string/CMakeLists.txt:57 (file)
file(GLOB_RECURSE NEW_GLOB LIST_DIRECTORIES false "C:/*/dev/boost/libs/static_string/include/boost/*.ipp")
set(OLD_GLOB
)
if(NOT "${NEW_GLOB}" STREQUAL "${OLD_GLOB}")
message("-- GLOB mismatch!")
file(TOUCH_NOCREATE "C:/*/dev/bplan/out/build/msvc-dbg/CMakeFiles/cmake.verify_globs")
endif()
# BOOST_STATIC_STRING_HEADERS at C:/*/dev/boost/libs/static_string/CMakeLists.txt:57 (file)
file(GLOB_RECURSE NEW_GLOB LIST_DIRECTORIES false "C:/*/dev/boost/libs/static_string/include/boost/*.natvis")
set(OLD_GLOB
)
if(NOT "${NEW_GLOB}" STREQUAL "${OLD_GLOB}")
message("-- GLOB mismatch!")
file(TOUCH_NOCREATE "C:/*/dev/bplan/out/build/msvc-dbg/CMakeFiles/cmake.verify_globs")
endif()
There is no need to re-check globs for 3rd party libs that are being changed only on pulling updates (not frequent change).
I believe VerifyGlobs.cmake should only contain user globs, if user specified CONFIGURE_DEPENDS in his own project.
Good alternative example is the boost::beast that uses glob only in non-library mode:
if (BOOST_BEAST_IS_ROOT)
file(GLOB_RECURSE BOOST_BEAST_HEADERS CONFIGURE_DEPENDS include/boost/*.hpp)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost PREFIX "" FILES ${BOOST_BEAST_HEADERS})
target_sources(boost_beast PRIVATE ${BOOST_BEAST_HEADERS} build.jam)
endif ()
- Dominant language
- HTML
- Stars
- 8.6k
- Forks
- 2k
- Avg merge
- 9h 35m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/boost
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
CI: pin OS images in build/publish tests instead of `*-latest`Possibly taken @shikhabhadoria claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vacanza/holidays#4220 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Niko1221/Strata#6731 · 2 comments ·
Maintainers usually reply within 6 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
dependencies go good first issue priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fukubie/StockLlama#48 ·