Skip to content

[CMake] Don't use find_package(ROOT REQUIRED) in test/ subdirectory#20640

Merged
guitargeek merged 2 commits intoroot-project:masterfrom
guitargeek:roottest_cmake
Dec 8, 2025
Merged

[CMake] Don't use find_package(ROOT REQUIRED) in test/ subdirectory#20640
guitargeek merged 2 commits intoroot-project:masterfrom
guitargeek:roottest_cmake

Conversation

@guitargeek
Copy link
Contributor

As Sergey said in the comment in test/CMakeLists.txt, this test
project stopped working standalone. But, it still uses
find_package(ROOT) to find ROOT, even though it's not installed yet as
we are building ROOT itself at the same time.

Apparently that works, and sets the flags like ROOT_opengl_FOUND, but
we should not rely on this and use the build-time configuration flags
instead.

@guitargeek guitargeek self-assigned this Dec 4, 2025
@guitargeek guitargeek requested a review from bellenot as a code owner December 4, 2025 09:34
@guitargeek guitargeek added in:Build System clean build Ask CI to do non-incremental build on PR labels Dec 4, 2025
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Test Results

    22 files      22 suites   3d 19h 46m 25s ⏱️
 3 784 tests  3 784 ✅ 0 💤 0 ❌
81 227 runs  81 227 ✅ 0 💤 0 ❌

Results for commit 994c94c.

♻️ This comment has been updated with latest results.

Has been deprecated since ROOT 6.20 and can now be removed.
As Sergey said in the comment in `test/CMakeLists.txt`, this test
project stopped working standalone. But, it still uses
`find_package(ROOT)` to find ROOT, even though it's not installed yet as
we are building ROOT itself at the same time.

Apparently that works, and sets the flags like `ROOT_opengl_FOUND`, but
we should not rely on this and use the build-time configuration flags
instead.
@guitargeek
Copy link
Contributor Author

@pcanal, I addressed all your inline comments

Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

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

Thanks.

@guitargeek guitargeek merged commit 9d2dc6e into root-project:master Dec 8, 2025
32 checks passed
@guitargeek guitargeek deleted the roottest_cmake branch December 8, 2025 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:Build System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants