[CMake] Why some libs use `CONFIGURE_DEPENDS`???
- Dominant language
- HTML
- Stars
- 8.6k
- Forks
- 1.9k
- Avg merge
- 39m
- Merged PRs (30d)
- 2
Description
It causes creation of `...\CMakeFiles\VerifyGlobs.cmake` polluted with glob checks for certain boost libraries:
Spoiler
```cmake
# 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:
```cmake
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 ()
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.