-
Notifications
You must be signed in to change notification settings - Fork 4
cmake: fix test and examples options #50
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes CMake configuration issues related to test and example build options. The changes make the default behavior more consistent and correctly nest example dependencies within the test infrastructure.
Key changes:
- Changed
BOOST_OPENMETHOD_BUILD_TESTSdefault fromOFFto${BOOST_OPENMETHOD_IS_ROOT}to match the examples option behavior - Moved example library dependency configuration inside the test conditional block
- Reorganized examples section to be nested within the testing conditional, reflecting the actual dependency on test infrastructure
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
An automated preview of the documentation is available at https://50.openmethod.prtest3.cppalliance.org/libs/openmethod/doc/html/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2025-12-14 15:20:25 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #50 +/- ##
========================================
Coverage 92.03% 92.03%
========================================
Files 40 40
Lines 2838 2838
Branches 1354 1354
========================================
Hits 2612 2612
Misses 187 187
Partials 39 39 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| endforeach () | ||
| # Conditional dependencies | ||
| if (NOT BOOST_OPENMETHOD_MRDOCS_BUILD) | ||
| if (BUILD_TESTING OR BOOST_OPENMETHOD_BUILD_TESTS) |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition BUILD_TESTING OR BOOST_OPENMETHOD_BUILD_TESTS is redundant. Since lines 46-48 ensure that BOOST_OPENMETHOD_BUILD_TESTS is ON whenever BUILD_TESTING is ON, checking BUILD_TESTING separately is unnecessary. Consider simplifying this to just check BOOST_OPENMETHOD_BUILD_TESTS for better maintainability.
| if (BUILD_TESTING OR BOOST_OPENMETHOD_BUILD_TESTS) | |
| if (BOOST_OPENMETHOD_BUILD_TESTS) |
| WARNING | ||
| "BOOST_OPENMETHOD_BUILD_EXAMPLES requires BOOST_OPENMETHOD_BUILD_TESTS. Examples will not be built.") | ||
| set(BOOST_OPENMETHOD_BUILD_EXAMPLES OFF) | ||
| endif() |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent spacing in endif statement. Line 68 uses endif() without a space, while line 213 (also newly added in this PR) uses endif () with a space. Consider standardizing on one style throughout the file for consistency.
| endif() | |
| endif () |
| set(BOOST_OPENMETHOD_EXAMPLE_LIBRARIES dll) | ||
| if (BOOST_OPENMETHOD_BUILD_EXAMPLES) | ||
| set(BOOST_OPENMETHOD_EXAMPLE_LIBRARIES dll) | ||
| endif() |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent spacing in endif statement. Line 107 uses endif() without a space, while line 213 (also newly added in this PR) uses endif () with a space. Consider standardizing on one style throughout the file for consistency.
| endif() | |
| endif () |
|
|
||
| option( | ||
| BOOST_OPENMETHOD_BUILD_TESTS | ||
| "Build boost::openmethod tests even if BUILD_TESTING is OFF" |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option description is now misleading. The option no longer allows building tests "even if BUILD_TESTING is OFF" because lines 46-48 force BOOST_OPENMETHOD_BUILD_TESTS to ON when BUILD_TESTING is ON. The description should be updated to accurately reflect that this option enables tests by default when the project is root, but is overridden to ON when BUILD_TESTING is ON.
| "Build boost::openmethod tests even if BUILD_TESTING is OFF" | |
| "Enable boost::openmethod tests by default when this is the root project; always ON if BUILD_TESTING is ON" |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.