Skip to content

unified cmake test#71

Draft
jll63 wants to merge 4 commits intoboostorg:developfrom
jll63:fix/cmake
Draft

unified cmake test#71
jll63 wants to merge 4 commits intoboostorg:developfrom
jll63:fix/cmake

Conversation

@jll63
Copy link
Copy Markdown
Collaborator

@jll63 jll63 commented Apr 26, 2026

@cppalliance-bot
Copy link
Copy Markdown

cppalliance-bot commented Apr 26, 2026

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

Copy link
Copy Markdown

Copilot AI left a 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 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) exercising BOOST_OPENMETHOD dispatch.
  • Remove the older test/cmake_subdir_test/* and test/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.

Comment thread test/cmake_test/CMakeLists.txt Outdated
Comment thread test/cmake_test/CMakeLists.txt Outdated
Comment on lines +25 to +30
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)
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Comment on lines +36 to +41
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}/../../../*)
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Comment thread test/cmake_test/CMakeLists.txt Outdated
jll63 and others added 2 commits April 26, 2026 14:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.34%. Comparing base (814a8e0) to head (7ac39f0).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e629b2f...7ac39f0. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a 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 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.

Comment thread test/cmake_test/CMakeLists.txt Outdated
Comment on lines +39 to +41
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}/../../../*)
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 uses AI. Check for mistakes.
@jll63
Copy link
Copy Markdown
Collaborator Author

jll63 commented Apr 26, 2026

@copilot apply changes based on the comments in this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants