Enable install in non-top-level projects via NAMESPACE_INSTALL#19
Closed
sean-parent wants to merge 3 commits into
Closed
Enable install in non-top-level projects via NAMESPACE_INSTALL#19sean-parent wants to merge 3 commits into
sean-parent wants to merge 3 commits into
Conversation
Installation is now enabled if either building as a top-level project or if the `${NAMESPACE}_INSTALL` variable is set to ON. Updated documentation to explain how to enable installation in non-top-level projects, improving support for package managers and advanced workflows.
Introduces a CMake option `${NAMESPACE}_INSTALL` (defaulting to `PROJECT_IS_TOP_LEVEL`) to explicitly enable or disable installation of the library. Updates documentation and refactors install logic to use this option, allowing more flexible control for both top-level and subproject builds.
- Updated doctest dependency version from 2.4.12 to 2.5.2 in cpp-library.cmake. - Improved README.md with additional setup instructions for CPM.cmake and local usage examples. - Refined CI workflow configuration in ci.yml and ci.yml.in to utilize defined action variables for better maintainability. - Updated Doxygen theme dependency version from 2.4.1 to 2.4.2 in cpp-library-docs.cmake. - Added new graph options in Doxyfile.in to control documentation output.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit fa53f42. Configure here.
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: @CI_ACTION_CHECKOUT@ | ||
| - if: ${{ startsWith(matrix.config.os, 'windows') }} |
There was a problem hiding this comment.
CI template references non-existent matrix.config.os path
High Severity
The newly added MSVC dev cmd step uses matrix.config.os but the matrix defines os directly on each entry, not nested under a config key. The runs-on directive on line 35 correctly references matrix.os. Since matrix.config is undefined, startsWith(matrix.config.os, 'windows') will always evaluate to false, so the MSVC developer environment will never be activated on Windows builds — likely causing build failures for all generated CI workflows.
Reviewed by Cursor Bugbot for commit fa53f42. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Installation is now enabled if either building as a top-level project or if the
${NAMESPACE}_INSTALLvariable is set to ON. Updated documentation to explain how to enable installation in non-top-level projects, improving support for package managers and advanced workflows.Note
Medium Risk
Changes when install rules/config exports are generated, which can affect downstream consumers and packaging workflows if the new
${NAMESPACE}_INSTALLdefault/override is misapplied. Also bumps several CI/docs dependencies, which may cause minor build/CI behavior differences.Overview
Installation is no longer tied solely to top-level builds.
_cpp_library_setup_install()now defines and checks an uppercased${NAMESPACE}_INSTALLoption (default:PROJECT_IS_TOP_LEVEL) so installation/export rules can be explicitly enabled for non-top-level/CPM consumers or disabled for top-level builds.Docs/CI updates. README is updated with CPM setup and examples for toggling
${NAMESPACE}_INSTALL, the CI workflow template is parameterized to centralize GitHub Action version refs (and adds MSVC env setup), and dependency versions are bumped (e.g.,doctest,doxygen-awesome-css) plus Doxygen graph generation is disabled intemplates/Doxyfile.in.Reviewed by Cursor Bugbot for commit fa53f42. Bugbot is set up for automated code reviews on this repo. Configure here.