Support FetchContent, add_subdirectory, and standalone install#182
Support FetchContent, add_subdirectory, and standalone install#182sgerbino merged 1 commit intocppalliance:developfrom
Conversation
Use generator expressions for include directories so paths don't leak to consumers. Gate benchmarks and tests behind options that default to OFF for subdirectory builds. Add EXPORT_NAME so the imported target is Boost::capy across all consumption patterns. Provide boost_install() for superproject builds and a standalone install path with config/version files for find_package() support. Remove CMakePresets.json and ASCII section dividers.
📝 WalkthroughWalkthroughThis PR modernizes the project's CMake configuration by introducing explicit build options (BOOST_CAPY_BUILD_TESTS and BOOST_CAPY_BUILD_BENCH), restructuring package installation logic with standard CMake patterns, removing CMakePresets.json, updating build instructions, and adding a CMake package config file for FetchContent integration. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
An automated preview of the documentation is available at https://182.capy.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-02-23 19:30:48 UTC |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
README.md (1)
23-37: Pin FetchContent to a release/commit for reproducible builds.Using a moving branch can cause non-deterministic builds; consider a fixed tag or commit SHA.
Suggested doc tweak
FetchContent_Declare(capy GIT_REPOSITORY https://github.com/cppalliance/capy.git - GIT_TAG develop + GIT_TAG vX.Y.Z # or a specific commit SHA GIT_SHALLOW TRUE)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` around lines 23 - 37, Update the CMake example in the README to pin FetchContent to a fixed release tag or commit SHA instead of the moving branch "develop": modify the FetchContent_Declare call (symbol: FetchContent_Declare) to set GIT_TAG to a specific release (or commit SHA) and keep GIT_REPOSITORY and GIT_SHALLOW as needed so consumers get reproducible builds when linking Boost::capy via target_link_libraries.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@README.md`:
- Around line 23-37: Update the CMake example in the README to pin FetchContent
to a fixed release tag or commit SHA instead of the moving branch "develop":
modify the FetchContent_Declare call (symbol: FetchContent_Declare) to set
GIT_TAG to a specific release (or commit SHA) and keep GIT_REPOSITORY and
GIT_SHALLOW as needed so consumers get reproducible builds when linking
Boost::capy via target_link_libraries.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.gitignoreCMakeLists.txtCMakePresets.jsonREADME.mdcmake/boost_capy-config.cmake.in
💤 Files with no reviewable changes (1)
- CMakePresets.json
|
GCOVR code coverage report https://182.capy.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-02-23 19:43:59 UTC |
Use generator expressions for include directories so paths don't leak to consumers. Gate benchmarks and tests behind options that default to OFF for subdirectory builds. Add EXPORT_NAME so the imported target is Boost::capy across all consumption patterns. Provide boost_install() for superproject builds and a standalone install path with config/version files for find_package() support. Remove CMakePresets.json and ASCII section dividers.
Summary by CodeRabbit
Documentation
Chores