Skip to content

[6.30] [v636][cmake] Quote list-valued cache variable in root-config generation - #23033

Merged
pcanal merged 1 commit into
root-project:v6-30-00-patchesfrom
root-project-bot:BP_6.30_pull_23027
Aug 6, 2026
Merged

[6.30] [v636][cmake] Quote list-valued cache variable in root-config generation#23033
pcanal merged 1 commit into
root-project:v6-30-00-patchesfrom
root-project-bot:BP_6.30_pull_23027

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #23027, requested by @pcanal.

The loop that builds the `root-config --config` argument list guards each
cache variable with

    if((var MATCHES "_(LIBRARIES|LIBRARY|INCLUDE|VERSION)") AND
       (NOT ${${var}} STREQUAL "") AND
       (NOT ${var} MATCHES "NOTFOUND"))

When the variable holds a list (e.g.
CLING_LIBRARIES=clingInterpreter;clingMetaProcessor;clingUtils) the
unquoted ${${var}} expands to several tokens, so the parenthesised
sub-expression `(NOT a b c STREQUAL "")` is malformed. CMake silently
accepted this until 4.4, which now propagates errors from parenthesised
if() sub-expressions (Kitware/CMake@240481490c, kitware/cmake#26424) and
fails configuration with "Unknown arguments specified".

Quote the expansion so the value is compared as a single string. Besides
fixing configuration with CMake >= 4.4, this restores the intended
behaviour: list-valued variables were previously dropped from
`root-config --config` (the malformed guard evaluated to false) and are
now included.

Signed-off-by: Chris Burr <christopher.burr@cern.ch>
(cherry picked from commit f8771bf)
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Test Results

     5 files       5 suites   16h 13m 35s ⏱️
 2 478 tests  2 477 ✅ 0 💤 1 ❌
12 231 runs  12 230 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit b66e369.

@pcanal

pcanal commented Aug 6, 2026

Copy link
Copy Markdown
Member

The one test failure is unrelated.

@pcanal
pcanal merged commit c5b24e7 into root-project:v6-30-00-patches Aug 6, 2026
6 of 8 checks passed
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.

4 participants