These tests experience frequent timeouts in CI, which are either actual
timeouts due to low resource runners, or a platform-specific bug
causing an indefinite hang. Either way, it's beneficial to locate these
in their own test suite to reduce noise and ensure the rest of the
tests pass regularly.
cmCTestLaunch, which backs ctest --launch and ctest --instrument,
derived its exit code from the child's SpawnResult and ExitStatus but
ignored TermSignal. On POSIX a command killed by a signal reports
ExitStatus 0 and TermSignal N, so the launcher reported success for a
crashed or killed command, masking failed compile/link/custom rules on
the dashboard and in instrumentation snippets.
Classify the child with the ordered triple SpawnResult, TermSignal,
ExitStatus, mapping a signal-killed child to a non-zero exit code.
Native Windows is unaffected: abnormal termination already arrives as a
non-zero exit code there.
Fixes: #27921
Add a small 7z fixture whose filter chain is ARM64 BCJ followed by
LZMA2. This exercises extraction through CMake's bundled libarchive
and liblzma path.
The fixture was generated with 7-Zip 25.01 (arm64). The payload is a
16-byte AArch64 instruction sequence:
1f2003d500000094000000141f2003d5
The payload mtime was set to 2026-06-21T00:00:00Z and then archived
with:
7z a -m0=ARM64 -m1=LZMA2 -mb0:1 -mtm=on -mtc=off -mta=off \
7zip-arm64-bcj.7z payload.bin
The resulting 7zip-arm64-bcj.7z has SHA256:
3DE9111E71C6AA3CBD604460040EBBE6F57E8B00D1D5C5343AC07D435AA2A8D2
Add a regression test for the File API codemodel graph produced for an
import std target. The test verifies that emitted target references,
including those to the CMake-provided stdlib target, resolve to targets
present in the codemodel.
Closes: #27890
The overall `cmakeBuild` snippet is written only after the native build
tool returns, so interrupting `cmake --build` with Ctrl+C terminated CMake
before it was recorded and lost the build's delineation.
When instrumentation is active, install a scoped, async-signal-safe handler
(POSIX SIGINT; Windows CTRL_C/CTRL_BREAK) that just flags the interrupt. The
existing write then runs during unwind, records the interrupting signal in a
new `interruptSignal` field, skips the post-build index hook, and re-raises so
the exit status still reflects the signal.
The handler lives in its own translation unit, keeping the platform-divergent
signal code out of the main instrumentation implementation.
Issue: #27859
Preserve backslashes in arguments passed to macros by re-escaping
them before substituting in the macro body, where they will be
parsed again.
Fixes: #19281, #22157, #23641, #25803, #27645, #20891
When a built-in cache variable is set via `-D <var>=<value>` with no
help text supplied, populate `HELPSTRING` from the built-in
documentation table (sourced from `Help/variable/*.rst` and the
per-language pattern manuals). Project-defined and unknown variables
continue to receive the legacy "No help, variable specified on the
command line." sentinel.
The cache entry's type and value are left untouched: type stays
`UNINITIALIZED` for bare `-D` and an explicit `-D <var>:TYPE=<value>`
is honored as before. The `cmCacheManager::LoadCache` path is not
modified, so reload of existing caches is a fixed point.
Fixes: #27830
Detect when the requested module name differs in case from the module
filename on disk. Emit an author warning on Windows and Apple
platforms, where case-insensitive lookup can hide portability problems
on case-sensitive filesystems.
Fixes: #27811
11adb3b7ae Linker/Windows-MSVC: check for a non-empty linker version
32c12e6901 Modules/CMakeLANGCompiler.cmake.in: quote linker version and frontend variant
31946711d3 CMakeDetermineCompilerSupport: support skipping compiler feature checks
71d908010f Modules/DetermineCompiler: support skipping compiler checks
e267321f93 Modules/DetermineCompiler: avoid the cache for ABI compilations
94f4c64461 Tests/RunCMake/ToolchainSkipsChecks: add tests for skipping compiler checks
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11917
There is interest in being able to craft a toolchain file that skips all
(relatively expensive) `try_*` commands during compiler detection. Add
tests which:
- discover the toolchain for a language
- write a toolchain file using that knowledge
- add a test that uses the toolchain file
- verify that the toolchain file-using test performs no `try_*` commands
by inspecting the configure log
There are also checks which use `execute_process`, but these are far
less expensive and not a worry at the moment.
a79ac015c6 ctest: Merge llvm-cov's .profraw files into a .profdata file for each test
5494697ed1 Tests: Add case for llvm-cov usage by ctest command line modes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12007
If the CTEST_TEST_COVERAGE_TOOL is set to LLVM-COV, use the
`llvm-profdata --merge` functionality to collect the `.profraw` files
generated by running each test into a combined `.profdata` file.
This is the file that could be used to parse or display coverage
information for each test.
Issue: #26932
72e7305c3e Diagnostics: Handle CMAKE_{WARN,ERROR}_DEPRECATED
be057c5a01 cmVariableWatch: Use enum for access type
cba542f32c cmake.cxx: Organize includes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11948
Capture `execute_process` calls' `RESULT_VARIABLE`.
We don't actually need to check the result as we presume the existing
logic is already adequate, and sometimes programs return non-zero values
as result of valid query. I.e. this is a "safe" way to broadly protect
these scripts.
Issue: #27782
Update documentation for aforementioned variables, as their use is
deprecated under the new diagnostic system. Introduce a policy which
reintroduces their use to control specific deprecation diagnostics if
the policy is not NEW.
Note that this means there is NO synchronization between the variables
and the new diagnostic state.
Two targets whose names differ only in a `.exe` suffix create a
conflict when adding target- and file-level dependencies for a custom
command. Add CMP0212 to provide compatibility with the old behavior.
Issue: #27612
The UTF-8 charset is a superset of the C locale's 7-bit ASCII charset.
Since commit d284ce2fd6 (Initialize character set encoding on program
startup, 2026-02-02, v4.3.0-rc1~40^2) we set a single locale globally.
We can handle archives with UTF-8 paths by running in a locale with a
UTF-8 charset.
Fixes: #25226
Issue: #26903
Issue: #27562
0c355dfcf7 tar: Use UTF-8 as a default encoding
21eb53e9eb tar: Add option to specify the encoding of archive pathnames
0435b76095 libarchive: Build with iconv to handle entry path encoding
24cb39e081 libarchive: Suppress upstream preference for MacPorts over macOS SDK
e07d0dacc9 cmArchiveWrite: Comment how we pass an entry pathname to libarchive
95040f37ed Tests/RunCMake/CommandLineTar: Improve formatting of error messages
e5c6c121c6 libarchive: Backport "Fix crash on failure to convert WCS/UTF-8 pathname"
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11601
Extend header set verification to support Objective-C and Objective-C++.
The supported-language table grows to {"C", "CXX", "OBJC", "OBJCXX"}
and the lattice join is updated so OBJCXX is chosen when both CXX and
OBJC sources are present. GenerateStubForLanguage emits .m/.mm stubs
and the relevant OBJC/OBJCXX standard properties are copied to the
verification target.
Add OBJC/OBJCXX test cases conditioned on CMake_TEST_OBJC, isolated in
dedicated project files to avoid affecting language inference for
unrelated targets. Update property documentation and add a release note.
63775fe60f FILE_SET: add the support of properties for file set inspection
9696a44cd3 Sphinx: update infrastructure for File Set properties support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11732