As written, foreach loops with a trailing `IN` (i.e., no loop
variable(s) given) lead to an assertion error. Handle this case by
exiting early when we know the loop won't execute anything.
Fixes: #27135
Since commit 13c7bb5b0c (cmGeneratorExpression: Update strip function to
collect parsed expressions, 2025-04-08), the logic to strip generator
expressions from a string made incorrect assumptions about the contents of
generator expressions, leading certain cases to be stripped incorrectly.
Clean up the logic and fix broken behavior, and add test coverage with
`string(GENEX_STRIP)`.
Fixes: #27133
Since commit 509c424472 (StdIo: Replace uses of KWSys Terminal with
StdIo::Print, 2025-05-08, v4.1.0-rc1~151^2~2) we print unnecessary VT100
escape sequences to establish normal text even when not intending to
print color. In combination with `CLICOLOR_FORCE=1`, this breaks
detection of implicit link information from compiler driver output.
Fixes: #27137
Fix commit 329d755dbd (StdIo: Add a Terminal abstraction to print color
text, 2025-05-06, v4.1.0-rc1~151^2~3) to avoid printing a VT100 escape
sequence for normal text if we did not print any sequence initially.
We already use this approach for Windows Console text attributes.
Issue: #26924
Refactor `cmFindPackageStack` to track additional metadata
about <package> found. This includes two new fields,
`Version` and `Location` which correspond to package version and path.
The remaining package information will be implemented in a later commit
Testing locally, `.idb` files are *not* made unconditionally with v71 at
least. Perhaps v90 is an outlier?
In any case, the typo introduced in 1f791eb160 (Multi-Ninja: Fix
reusable PCHs for MSVC, 2020-05-24) via !4787 (see
`cmLocalGenerator.cxx:2751` for extra space inside the quotes) was
preserved when fixing `IS_NEWER_THAN` logic in 28501fca94 (PCH PDB: Fix
misuse of IS_NEWER_THAN in timestamp check, 2021-02-21) from !5825. The
typo itself was fixed in cb46c4a918 (cmLocalGenerator: fix quoting in
generated script, 2025-06-16) via !10887 but the condition was fumbled
later in that MR's commit f78f592b78 (pchreuse: defer target existence
enforcement to generation time, 2025-06-16) in constructing `to_file`
for the script.
In the end, these typos ended up making the builds pass. In fixing it
properly in the parent commit, it exposed MSVC v71 as an outlier in
passing the tests again. Since I do not see `.idb` files with the
toolchain as tested in CI, further investigation into the build that
caused the condition to be added in the first place is required. In the
meantime, removing this check makes things happy as far as CMake's own
test suite is concerned.
The plain "Exit code" string had a newline that we do not have in the
other result strings. This typo was inherited from KWSys Process,
which has been fixed by its upstream.
Fixes: #27119
Add the support of CACHE{variable} syntax to enable:
* better consistency with other commands which use this syntax
* more flexibility regarding cache variable options
In commit 9e87df4d46 (Autogen/RCC: Disable zstd if it is not supported,
2024-02-08, v3.29.0-rc1~5^2) we added this flag, but it doesn't exist
for Qt 5. It was only introduced with qtbase commit `14546d1816a8`,
which first appeared in Qt 6.
Fixes: #27111
Issue: #25664
Fix a bug in the split build model where we generate a dependency on the
swiftmodule of a target that does not emit a swiftmodule.
This fix drops the erroneous swiftmodule dependency edge, avoiding the
broken dependency graph. Incremental builds still work with the new
model because of the swiftmodule dependency edges between Swift
compilation steps.
Fixes: #26922