Boost
新闻
arrow_drop_down

将 B2 风格的测试粒度引入 CMake

Alan de Freitas
2025 年 7 月 11 日

https://cppalliance.org/alan/2025/07/10/Alan.html

通过构建测试可执行文件、在构建后通过列表标志提取测试名称、生成包含单个 add_test 条目的 .cmake 文件,并将其包含在 TEST_INCLUDE_FILES 中,从而实现了 B2 风格的粒度到 Boost 的 CMake 集成,实现了单独报告和选择性运行。