Use Levenshtein distance to track when the user may have made a typo in
an argument to `cmake -E` (i.e., an invalid mode; mode sub-arguments
are not tracked).
Harmonize IAR C-STAT headers between the first-time analysis
and subsequent builds, which uses cached results.
It also removes spurious relative paths such as `"../` and
`..\` that might appear after a new line followed by a double quote.
Effectively this will display paths relative to CMAKE_SOURCE_DIR,
similarly to the IDE, which display paths relative to $PROJ_DIR$.
Update the IAR tests to match the new C-STAT outputs.
There was an issue with a malformed command line introduced in
commit c7d2a172 (IAR: Add support for C-STAT static analysis,
2025-04-08, v4.1.0-rc1~385^2), where the source file was
incorrectly passed as a parameter when executing `icstat` in
HandleIcstat(). `icstat` does not take the source file as a
direct parameter.
- Separate definition files from object files while reading the
generated input list.
- Add batch bindexplib interfaces.
- Preserve native Windows COFF parsing for ordinary objects.
- Collect objects requiring nm and pass them to one nm process through a
response file. On non-Windows hosts, pass every object to nm.
- Request --print-file-name so single- and multi-object output use the
same format.
- Recognize text, data, and MSVC vftable symbols; ignore known
non-exported types and warn about unknown types.
- Capture nm stderr separately so diagnostics cannot corrupt stdout
symbol records.
Closes: #27995
Exclude files and directories matching the given patterns while creating
an archive, using libarchive's matcher for parity with file(ARCHIVE_EXTRACT).
Fixes: #27877.
Omit archive entries matching the given patterns when extracting or
listing. May be combined with PATTERNS; on overlap the exclusion
takes precedence.
Fixes: #27837
79c90b7afc cmSystemTools: Remove EnvDiff class
508a72fc1c cmCTestRunTest: Don't modify the current environment
61072fe317 cmcmd: Don't modify the current environment
31040ff609 cmEnvironment: Add class for environment modification
a5d0e0fb69 cmEnvironment: Introduce class for a set of environment variables
bf071f85fe cmSystemTools: Add env argument to RunSingleCommand
14edb7097f cmUVProcessChain: Add support for Environment
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11795
Use UTF-8 by default, as this has become common for cross-platform
archive distribution, and our previous default was platform-specific.
Also revert commit f590010167 (libarchive: Restore tolerance of archives
with non-OEM paths on Windows, 2026-01-23, v3.31.11~1^2). Its primary
purpose was to tolerate UTF-8 paths when extracting archives, which we
now handle by default.
Issue: #26903
d314cad7f1 Ninja,Make,FASTBuild: Avoid unnecessary Windows short paths in placeholders
8099fe4436 CMakeParseImplicitLinkInfo: Fix detection of MSVC link.exe from quoted path
c211b5b7f3 Makefile: Pass includes response file using native path style
728b8b34c2 IAR: Fix `ichecks` invocation on Windows when not using short paths
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11717
In commit c7d2a17253 (IAR: Add support for C-STAT static analysis,
2025-04-08, v4.1.0-rc1~385^2) we accidentally assumed the path to
`ichecks` never has a space. It worked because we always constructed
the path from a Windows "short path" to the compiler tool. Avoid
relying on that.
If --template-array-placeholder or --template-length-placeholder
were specified without --template-file, a segfault resulted from
trying to read from a std::istream* that was set to nullptr.
Explicitly check to see if these options are set without
--template-file.
Run Tests/RunCMake/cmake-E-bin2c/generate_files.sh to regenerate the
following files:
- Tests/RunCMake/cmake-E-bin2c/long.c.txt
- Tests/RunCMake/cmake-E-bin2c/long_signed.c.txt
- Tests/RunCMake/cmake-E-bin2c/long_decimal.c.txt
- Tests/RunCMake/cmake-E-bin2c/long_signed_decimal.c.txt
- Tests/RunCMake/cmake-E-bin2c/hashes.cmake
Run it with --very-long to regenerate the following additional files:
- Tests/RunCMake/cmake-E-bin2c/very_long_params.cmake
Print the system error message in case of failure when calling
`CopyFileAlways`, `CopyFileIfDifferent`, `CopyFileIfNewer`,
`CopyADirectory` and `MakeDirectory`.
Remove unnecessary `cmSystemTools` wrappers for `CopyFileIfNewer` and
`CopyADirectory`.
Fixes: #18276
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
The latter:
* uses a type-safe representation of text attributes,
* works with `StdIo::Console` to print arbitrary UTF-8 text in color, and
* writes VT100 sequences to Windows Consoles when supported, eliminating
racy console text attribute changes in parallel `make` output.
Fixes: #22450, #26689, #26924