Conversation
|
An automated preview of the documentation is available at https://71.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. 2026-04-26 21:15:39 UTC |
There was a problem hiding this comment.
Pull request overview
This PR consolidates/updates the CMake-based integration test setup for Boost.OpenMethod to follow the “unified cmake test” pattern (tracking the referenced Boost.URL layout), replacing the previous cmake_subdir_test / cmake_install_test scaffolding.
Changes:
- Add a unified
test/cmake_test/CMake project that supports multiple CI modes (install test, module install test, Boost superproject subdir test, and standalone add_subdirectory test). - Add a CMake-driven example program (
test/cmake_test/main.cpp) exercisingBOOST_OPENMETHODdispatch. - Remove the older
test/cmake_subdir_test/*andtest/cmake_install_test/*CMake test files.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/cmake_test/main.cpp | Adds the unified CMake test executable source demonstrating openmethod dispatch. |
| test/cmake_test/CMakeLists.txt | Adds the unified CMake test driver with multiple CI configuration modes. |
| test/cmake_subdir_test/main.cpp | Removed in favor of the unified cmake_test program. |
| test/cmake_subdir_test/CMakeLists.txt | Removed in favor of unified multi-mode CMake logic. |
| test/cmake_install_test/CMakeLists.txt | Removed; install/module install covered by unified cmake_test logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| set(BOOST_OPENMETHOD_BUILD_TESTS OFF CACHE BOOL "Build the tests." FORCE) | ||
| set(PREV_BUILD_TESTING ${BUILD_TESTING} OFF CACHE BOOL "Build the tests." FORCE) | ||
| set(BUILD_TESTING OFF CACHE BOOL "Build the tests." FORCE) | ||
| set(BOOST_INCLUDE_LIBRARIES openmethod) | ||
| add_subdirectory(../../../.. boost) | ||
| set(BUILD_TESTING ${PREV_BUILD_TESTING} CACHE BOOL "Build the tests." FORCE) |
There was a problem hiding this comment.
set(PREV_BUILD_TESTING ${BUILD_TESTING} OFF CACHE BOOL ...) passes two values, so when BUILD_TESTING is defined this becomes a list like ON;OFF and the later restore sets BUILD_TESTING to that list. Store the previous value in a normal (non-CACHE) variable (or handle the undefined case explicitly) before forcing BUILD_TESTING OFF, then restore from that single value.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
@copilot apply changes based on this feedback
| set(BOOST_OPENMETHOD_BUILD_TESTS OFF CACHE BOOL "Build the tests." FORCE) | ||
| set(BOOST_OPENMETHOD_BUILD_FUZZERS OFF CACHE BOOL "Build the fuzzers." FORCE) | ||
| set(BOOST_OPENMETHOD_BUILD_EXAMPLES OFF CACHE BOOL "Build the examples." FORCE) | ||
| set(PREV_BUILD_TESTING ${BUILD_TESTING} OFF CACHE BOOL "Build the tests." FORCE) | ||
| set(BUILD_TESTING OFF CACHE BOOL "Build the tests." FORCE) | ||
| file(GLOB subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/../../.. ${CMAKE_CURRENT_SOURCE_DIR}/../../../*) |
There was a problem hiding this comment.
Same issue as above: set(PREV_BUILD_TESTING ${BUILD_TESTING} OFF CACHE BOOL ...) can turn the cached value into a list (e.g. ON;OFF) and break the later restore. Capture the prior value as a single normal variable and restore BUILD_TESTING from that.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
@copilot apply changes based on this feedback
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #71 +/- ##
========================================
Coverage 94.34% 94.34%
========================================
Files 43 43
Lines 2916 2916
========================================
Hits 2751 2751
Misses 165 165 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| set(PREV_BUILD_TESTING ${BUILD_TESTING} OFF CACHE BOOL "Build the tests." FORCE) | ||
| set(BUILD_TESTING OFF CACHE BOOL "Build the tests." FORCE) | ||
| file(GLOB subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/../../.. ${CMAKE_CURRENT_SOURCE_DIR}/../../../*) |
There was a problem hiding this comment.
Same issue here: set(PREV_BUILD_TESTING ${BUILD_TESTING} OFF CACHE BOOL ...) can turn PREV_BUILD_TESTING into a list and the restore at the end of the branch will write that list back into the BUILD_TESTING cache entry. Store the previous BUILD_TESTING value in a normal variable (or handle the undefined case) and restore from that single value.
|
@copilot apply changes based on the comments in this thread |
Track https://github.com/boostorg/url/blob/develop/test/cmake_test/CMakeLists.txt