-
Notifications
You must be signed in to change notification settings - Fork 0
Enable install in non-top-level projects via NAMESPACE_INSTALL #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c77917f
Enable install in non-top-level projects via NAMESPACE_INSTALL
sean-parent 0e6c594
Add option to control installation via NAMESPACE_INSTALL
sean-parent fa53f42
Update dependencies and enhance CI configuration
sean-parent cd3d29e
Fix CI workflow condition for Windows OS detection
sean-parent 9be8569
Refactor cpp_library_setup to clarify installation control
sean-parent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,8 @@ function(_cpp_library_setup_docs) | |
| # Download doxygen-awesome-css theme via CPM | ||
| # https://github.com/jothepro/doxygen-awesome-css | ||
| CPMAddPackage( | ||
| URI gh:jothepro/[email protected] | ||
| # [DEPENDENCY] https://github.com/jothepro/doxygen-awesome-css/releases | ||
| URI gh:jothepro/[email protected] | ||
| DOWNLOAD_ONLY YES | ||
| ) | ||
|
|
||
|
|
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -155,7 +155,8 @@ endfunction() | |
| # Sets up a C++ header-only or compiled library with testing, docs, and install support. | ||
| # - Precondition: PROJECT_NAME defined via project(), at least one HEADERS specified | ||
| # - Postcondition: library target created, version set from git tags, optional tests/docs/examples configured | ||
| # - When PROJECT_IS_TOP_LEVEL: also configures templates, testing, docs, and installation | ||
| # - When PROJECT_IS_TOP_LEVEL: also configures templates, testing, and docs | ||
| # - Installation is controlled by ${NAMESPACE}_INSTALL (defaults to PROJECT_IS_TOP_LEVEL) | ||
| function(cpp_library_setup) | ||
| # Parse arguments | ||
| set(oneValueArgs | ||
|
|
@@ -270,7 +271,6 @@ function(cpp_library_setup) | |
| HEADERS "${GENERATED_HEADERS}" | ||
| SOURCES "${GENERATED_SOURCES}" | ||
| REQUIRES_CPP_VERSION "${ARG_REQUIRES_CPP_VERSION}" | ||
| TOP_LEVEL "${PROJECT_IS_TOP_LEVEL}" | ||
| ) | ||
|
|
||
| # Only setup development infrastructure when building as top-level project | ||
|
|
@@ -289,7 +289,8 @@ function(cpp_library_setup) | |
| # This must happen during normal configuration (not deferred) because CPMAddPackage uses add_subdirectory | ||
| if(BUILD_TESTING AND (ARG_TESTS OR ARG_EXAMPLES)) | ||
| if(NOT TARGET doctest::doctest) | ||
| CPMAddPackage("gh:doctest/[email protected]") | ||
| # [DEPENDENCY] https://github.com/doctest/doctest/releases | ||
| CPMAddPackage("gh:doctest/[email protected]") | ||
| endif() | ||
| endif() | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| # Auto-generated from cpp-library (https://github.com/stlab/cpp-library) | ||
| # Do not edit this file directly - it will be overwritten when templates are regenerated | ||
| # Dependency versions are defined in cmake/cpp-library-ci.cmake (with source links) | ||
|
|
||
| name: CI | ||
|
|
||
|
|
@@ -34,7 +35,9 @@ jobs: | |
| runs-on: ${{ matrix.os }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: @CI_ACTION_CHECKOUT@ | ||
| - if: ${{ startsWith(matrix.os, 'windows') }} | ||
| uses: @CI_ACTION_MSVC_DEV_CMD@ | ||
|
|
||
| - name: Configure CMake | ||
| run: cmake --preset=test | ||
|
|
@@ -97,7 +100,7 @@ jobs: | |
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: @CI_ACTION_CHECKOUT@ | ||
|
|
||
| - name: Configure CMake with clang-tidy | ||
| run: cmake --preset=clang-tidy | ||
|
|
@@ -117,11 +120,10 @@ jobs: | |
| contents: read | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: @CI_ACTION_CHECKOUT@ | ||
|
|
||
| # ssciwr/[email protected] | ||
| - name: Install Doxygen | ||
| uses: ssciwr/doxygen-install@501e53b879da7648ab392ee226f5b90e42148449 | ||
| uses: @CI_ACTION_DOXYGEN_INSTALL@ | ||
|
|
||
| - name: Configure CMake | ||
| run: cmake --preset=docs | ||
|
|
@@ -130,13 +132,13 @@ jobs: | |
| run: cmake --build --preset=docs | ||
|
|
||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v5 | ||
| uses: @CI_ACTION_CONFIGURE_PAGES@ | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v4 | ||
| uses: @CI_ACTION_UPLOAD_PAGES_ARTIFACT@ | ||
| with: | ||
| path: build/docs/html | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
| uses: @CI_ACTION_DEPLOY_PAGES@ | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.