Skip to content

[6.32] [v636][cmake] Quote list-valued cache variable in root-config generation - #23031

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

[6.32] [v636][cmake] Quote list-valued cache variable in root-config generation#23031
pcanal merged 1 commit into
root-project:v6-32-00-patchesfrom
root-project-bot:BP_6.32_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 5, 2026

Copy link
Copy Markdown

Test Results

     6 files       6 suites   20h 23m 37s ⏱️
 2 563 tests  2 563 ✅ 0 💤 0 ❌
14 963 runs  14 963 ✅ 0 💤 0 ❌

Results for commit 668dcf9.

@pcanal
pcanal merged commit c801fb1 into root-project:v6-32-00-patches Aug 6, 2026
9 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