[CMake] Why some libs use `CONFIGURE_DEPENDS`???
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- cmake
- 领域
- build-system
调研方向
从 boost/libs/static_string/CMakeLists.txt 第 57 行开始,将其对 CONFIGURE_DEPENDS 的使用与 boost::beast 示例进行比较,后者将 glob 限制在非库模式下。在配置期间重新生成 CMakeFiles/VerifyGlobs.cmake,然后追踪哪些 Boost 库的 CMake 文件添加了这些检查。完成的标准是确定是否应排除第三方库的 glob,同时保留用户项目的 glob 检查。
由索引模型根据 Issue 内容生成。
描述
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 ()
- 主要语言
- HTML
- 星标
- 8.6k
- 派生
- 2k
- 平均合并
- 9 小时 35 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
boostorg/boost 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 52/100
-
难度 3/5 1-2 天 新手友好度 55/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 48/100
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 78/100
conda-forge/zarpaint-feedstock#8 · 1 条评论 · 1 个 reaction ·
-
难度 1/5 1 小时以内 新手友好度 65/100
oras-project/rust-oci-client-node#132 ·
维护者通常 2 天内回复
-
out-of-date
难度 1/5 1 小时以内 新手友好度 62/100
CachyOS/CachyOS-PKGBUILDS#2177 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 68/100
-
CI: pin OS images in build/publish tests instead of `*-latest`可能已有人在做 @shikhabhadoria 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
vacanza/holidays#4220 · 1 条评论 ·
维护者通常 1 天内回复