Prior to this commit, cmake --build <dir> --preset <pre> needed to be called
from the source directory. We now look up the source directory in
CMakeCache.txt when a build directory is specified on the command line.
Issue: #27075
Add a new APPLY action to list(TRANSFORM) that invokes a user-defined
function or macro for each element of the list, enabling arbitrary
per-element transformations.
The callable receives the current element value and an output variable
name, and must set the output variable in PARENT_SCOPE to the
transformed value.
Includes documentation, release notes, and tests for both function
and macro callables, OUTPUT_VARIABLE, error cases, and selector
combinations (AT, FOR, REGEX).
Refs: #27761
Since commit 4a4986d28a (cxxmodules: support command templates for BMI
compilation, 2026-03-25, v4.3.1~2^2~1) we can express module interface
unit compilation to either object files or BMI-only in a way that works
with `clang-scan-deps` and `clang-cl` together.
Fixes: #25731
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
Add a testPassthroughArguments field to the execution object of test
presets, allowing users to forward arguments to test executables via
preset JSON. This extends the existing ctest -- CLI feature into the
preset system as schema version 12.
Preset arguments are assigned first, then CLI -- arguments are appended
after, so both sources combine naturally.
Fixes: #20470
Always create `<target>_verify_*_header_sets` targets and the aggregate
`all_verify_*_header_sets` utility targets when the corresponding
property is enabled, even when no matching headers exist.
When headers exist, an OBJECT library is created as before. When no
headers are found, a UTILITY target is created instead to avoid
warnings from tools like Xcode's libtool about empty static libraries.
Update documentation with `.. versionchanged:: 4.4` directives, update
tests, and add a release note.
Fixes: #27685
Introduce a mechanism for "immediate" evaluation of preset macros as
they are defined in the current JSON file, rather than deferring until
after the preset graph is merged. This allows `${fileDir}` to always
be expanded with the path to the directory containing the file which
contains the macro, instead of the path being dependent on the preset
in which the macro is used (which could be defined and inherited from
elsewhere).
Bump to presets version 12 to provide backwards compatibility with the
old behavior.
Fixes: #26982
Relates: #27329, #27639
Add support for `ctest [options] -- <args>` to forward extra arguments
to every executed test's command line. Arguments after `--` are appended
after each test's own arguments in the order given.
This enables passing options to test frameworks like Google Test or
doctest without needing per-test ARGS properties:
ctest -R my_test -- --gtest_filter=SomeTest.Case
ctest --verbose -- --success
An error is raised if `--` is combined with `--build-and-test`, `-S`,
or `-D`/`-T`/`-M` modes, which have their own argument forwarding.
A bare `--` with no following arguments is silently ignored.
Fixes: #20470
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
da42e4ed20 cmGeneratorTarget: Add OBJC/OBJCXX support to header set verification
f974ef0f75 cmGeneratorTarget: Refactor header set verification for C and CXX
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11774