Skip to content

[cmake] Do not auto force-enable or force-disable user CMake build options - #23092

Open
ferdymercury wants to merge 10 commits into
root-project:masterfrom
ferdymercury:unforcecache
Open

[cmake] Do not auto force-enable or force-disable user CMake build options#23092
ferdymercury wants to merge 10 commits into
root-project:masterfrom
ferdymercury:unforcecache

Conversation

@ferdymercury

@ferdymercury ferdymercury commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Messing up with the cache is dangerous (calling to problems), and users often complain about not having the control since the build system changes what they just passed as flag to the command line. Instead, convert these automatism into a helpful error message that the user can use as a hotfix to modify their build flags. This prevents surprises, annoying behind-the-scene changes, as well as bugs. Follows up on the philosophy of #23020

Fixes https://its.cern.ch/jira/browse/ROOT-10743

@ferdymercury ferdymercury added the clean build Ask CI to do non-incremental build on PR label Aug 18, 2026
@ferdymercury ferdymercury reopened this Aug 18, 2026
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 19h 3m 27s ⏱️
 3 857 tests  3 856 ✅ 0 💤 1 ❌
79 503 runs  79 501 ✅ 1 💤 1 ❌

For more details on these failures, see this check.

Results for commit dbb1487.

♻️ This comment has been updated with latest results.

@ferdymercury
ferdymercury marked this pull request as ready for review August 18, 2026 10:55
…tions

Messing up with the cache is dangerous, and users often complain about not having the control since the build system changes what they just passed as flag to the command line.
Instead, convert these automatism into a helpful error message that the user can use as a hotfix to modify their build flags.
This prevents surprises, annoying behind-the-scene changes, as well as bugs.
Follows up on the phillosophy of root-project#23020

Fixes https://its.cern.ch/jira/browse/ROOT-10743
When cuda=On, but no viable compiler can be found, CMake produces the
hard-to-understand error:
  Cannot determine link language of RooBatchCompute_CUDA.

by hageboeck, cherrypicked from https://github.com/root-project/root/pull/23091/commits
@pcanal

pcanal commented Aug 18, 2026

Copy link
Copy Markdown
Member

@ferdymercury Can you add a comment to close the now seemingly superseded #18413 explaining where we actually ended up?

@ferdymercury ferdymercury added the skip code analysis Skip the code analysis CI steps for this PR, including verifying clang-formatting and running Ruff. label Aug 18, 2026
@ferdymercury

Copy link
Copy Markdown
Collaborator Author

Sure, comment added: #18413 (comment)
And CI errors fixed now.

@ferdymercury
ferdymercury marked this pull request as ready for review August 18, 2026 15:56
@pcanal pcanal self-assigned this Aug 18, 2026
Comment thread cmake/modules/RootBuildOptions.cmake Outdated
…nd split multioptions

and fix conflicting ssl=OFF vs builtin_openssl=ON on macos hotfix help message
Before, there was a subordinate hierarchical dependency, testing required testsupport.
Now they have a logical OR relationship, GTest will be a dependency if one or the other is enabled.
@ferdymercury
ferdymercury requested a review from pcanal August 19, 2026 09:51
Comment thread cmake/modules/RootBuildOptions.cmake Outdated
Comment thread cmake/modules/RootBuildOptions.cmake Outdated
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 skip code analysis Skip the code analysis CI steps for this PR, including verifying clang-formatting and running Ruff.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants