Skip to content

[CMake] Don't use find_package(ROOT) in tutorials/ subdirectory#20996

Merged
guitargeek merged 1 commit intoroot-project:masterfrom
guitargeek:tutorials
Jan 23, 2026
Merged

[CMake] Don't use find_package(ROOT) in tutorials/ subdirectory#20996
guitargeek merged 1 commit intoroot-project:masterfrom
guitargeek:tutorials

Conversation

@guitargeek
Copy link
Contributor

As Sergey said in the comment in tutorials/CMakeLists.txt, this tutorials 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.

This should better not be done. This commit suggest to remove it, and also replaces the variables defined by find_package(ROOT) with the built time variables.

This follows up on 9d2dc6e c21bc3f, and 458803e, which did the same for the test/ and roottest/ subdirectories.

As Sergey said in the comment in `tutorials/CMakeLists.txt`, this
tutorials 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.

This should better not be done. This commit suggest to remove it, and
also replaces the variables defined by `find_package(ROOT)` with the
built time variables.

This follows up on 9d2dc6e c21bc3f, and 458803e, which did
the same for the `test/` and `roottest/` subdirectories.
@github-actions
Copy link

Test Results

    22 files      22 suites   3d 11h 12m 43s ⏱️
 3 769 tests  3 769 ✅ 0 💤 0 ❌
75 858 runs  75 858 ✅ 0 💤 0 ❌

Results for commit 0eb4990.

Copy link
Member

@hageboeck hageboeck left a comment

Choose a reason for hiding this comment

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

LGTM, but maybe make the path to root.exe explicit.

@guitargeek
Copy link
Contributor Author

Thanks for the review! Your comments are perfectly valid and I will consider them, but as they are independent from this PR I'll do that in a followup PR.

@guitargeek guitargeek merged commit a6f0584 into root-project:master Jan 23, 2026
33 checks passed
@guitargeek guitargeek deleted the tutorials branch January 23, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants