Skip to content

fix: require BUILD_EXAMPLES for tests with USE_PODIO#501

Open
wdconinc wants to merge 1 commit into
JeffersonLab:masterfrom
wdconinc:patch-6
Open

fix: require BUILD_EXAMPLES for tests with USE_PODIO#501
wdconinc wants to merge 1 commit into
JeffersonLab:masterfrom
wdconinc:patch-6

Conversation

@wdconinc
Copy link
Copy Markdown
Member

src/programs/unit_tests/Components/JHasInputsTests.cc includes PodioDatamodel/ExampleHitCollection.h which is only build when examples are built.

Copilot AI review requested due to automatic review settings May 27, 2026 14:46
@wdconinc
Copy link
Copy Markdown
Member Author

FYI @nathanwbrei

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds a CMake configure-time guard to prevent an unsupported build configuration where unit tests are enabled with PODIO support but examples are disabled (tests depend on the PODIO example datamodel).

Changes:

  • Introduces a CMake FATAL_ERROR when BUILD_TESTS=ON, USE_PODIO=ON, and BUILD_EXAMPLES=OFF.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CMakeLists.txt
Comment on lines +75 to +77
if (${BUILD_TESTS} AND ${USE_PODIO} AND NOT ${BUILD_EXAMPLES})
message(FATAL_ERROR "BUILD_TESTS=ON requires BUILD_EXAMPLES=ON when USE_PODIO=ON (unit tests depend on the PODIO example datamodel)")
endif()
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.

2 participants