Commit Graph
3199 Commits
Author SHA1 Message Date
Brad King 811bf8fb89 Merge topic 'LINKER_TYPE-wild'
e96c5ba13d Add the support of the wild linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11966
2026-04-24 09:16:32 -04:00
Brad King ad5c6f5beb Merge topic 'cmake_build_preset_dir'
021cf4f4f7 cmake --build --preset: Relax CWD constraint

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !11962
2026-04-24 09:11:42 -04:00
Brad King e9e23c512e Merge topic 'list-transform-apply-only'
651f82642c Add APPLY action for list(TRANSFORM)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !11926
2026-04-24 09:03:50 -04:00
Marc Chevrier e96c5ba13d Add the support of the wild linker
Fixes: #27755
2026-04-23 16:21:30 +02:00
Zack Galbreath 021cf4f4f7 cmake --build --preset: Relax CWD constraint
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
2026-04-23 09:23:01 -04:00
Mickaël Germain 651f82642c Add APPLY action for list(TRANSFORM)
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
2026-04-22 19:04:12 -07:00
Brad King b1193d4693 Merge topic 'FindPython-PEP803'
985dba8084 FindPython: Add support of Stable ABI for Free-Threaded python

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Henry Schreiner <henryschreineriii@gmail.com>
Merge-request: !11955
2026-04-22 11:03:08 -04:00
Brad King cf11d9f349 Merge topic 'json-partial-equals'
b14da400de string(JSON): Add PARTIAL_EQUAL for subset style JSON comparisons

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11725
2026-04-22 09:17:19 -04:00
Marc Chevrier 985dba8084 FindPython: Add support of Stable ABI for Free-Threaded python
Add the support of PEP803.

Fixes: #27736
2026-04-21 23:13:00 +02:00
Taylor Sasser b14da400de string(JSON): Add PARTIAL_EQUAL for subset style JSON comparisons
Fixes: #27641
2026-04-21 08:41:49 -04:00
Daniel Pfeifer 83baea27a1 GoogleTest: Remove the LIST_SEPARATOR option 2026-04-20 22:19:52 +02:00
scivision 3f3ba04d81 file(READ_SYMLINK): Add RESULT option to capture errors
Closes: #27753
2026-04-17 10:51:28 -04:00
Brad King f9170481f1 Merge topic 'cpack-nsis-ignore-components-page'
8046ceadf3 CPack/NSIS: Add option to not display component selection page

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11927
2026-04-15 09:40:25 -04:00
Chris Mocock 8046ceadf3 CPack/NSIS: Add option to not display component selection page
Fixes: #27754
2026-04-14 15:16:01 +01:00
Brad King 0afca0c1e0 Merge topic 'CPACK_RPM_SPEC_MORE_DEFINE-list2string'
30aa150c25 CPack/RPM: `CPACK_RPM_SPEC_MORE_DEFINE` could be a list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11899
2026-04-14 09:53:55 -04:00
Marc Chevrier bc7d8bd26f FILE_SET: Add INDEPENDENT_FILES property for Ninja order dependency control
Fixes: #25370
2026-04-12 15:00:03 +02:00
Alex Turbov 30aa150c25 CPack/RPM: CPACK_RPM_SPEC_MORE_DEFINE could be a list
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2026-04-12 05:54:58 +04:00
Marc Chevrier df0a2aca6d FILE_SET: Add CXX_SCAN_FOR_MODULES property for per-file-set scanning control
This is more specific than both the target property and the
directory-wide source file property of the same name.
2026-04-03 09:29:29 -04:00
Marc Chevrier 5c5b68f44e FILE_SET: Add support for the SOURCES type
Fixes: #27550
2026-03-31 09:49:59 +02:00
Brad King ed48feeae8 clang-cl: Add support for C++ modules
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
2026-03-27 15:39:33 -04:00
Daniel Pfeifer 4e34426fb3 TestDriver: Add '-N' option to print all tests 2026-03-26 10:36:22 -04:00
Daniel Pfeifer 8600ce6547 discover_tests: Add documentation 2026-03-26 10:36:22 -04:00
AJIOB 97455c3d7e file: Add ARCHIVE_* options to specify pathname encoding
Issue: #26903
2026-03-24 14:07:21 -04:00
Brad King d409bdbcc2 Merge topic 'custom-target-exe-deps'
858fdd426b add_custom_command: Disallow exe-suffixed targets in DEPENDS
58ab03c031 add_custom_command: Update dependency search heuristics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11801
2026-03-24 09:11:34 -04:00
Baudouin Feildel 60aa09f038 PCH: Add CMAKE_DISABLE_PRECOMPILE_HEADERS environment variable
This provides a default for the cache entry of the same name.

Closes: #27609
2026-03-23 17:25:28 -04:00
Tyler Yankee 858fdd426b add_custom_command: Disallow exe-suffixed targets in DEPENDS
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
2026-03-23 09:50:46 -04:00
Marc Chevrier 167e903c15 FILE_SET: enforce uniqueness of files
A file should be unique for a target if specified as part of a file set.

Issue: #27035
2026-03-23 08:37:05 -04:00
Brad King 6bbbe81f64 Merge topic 'ExternalData-link-mode'
0db2ea9704 ExternalData: Add configurable link materialization mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11829
2026-03-20 08:54:02 -04:00
Brad King a9f3d5aa5e Merge topic 'cmake_install_j_allow_no_spaces'
def035dafd cmake install: Allow no spaces between j and parallel count

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11841
2026-03-20 08:51:46 -04:00
Brad King a9e128e908 Merge topic 'ctest-preset-passthrough-args'
5278110386 CMakePresets: Add testPassthroughArguments to test presets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Tyler Yankee <tyler.yankee@kitware.com>
Merge-request: !11805
2026-03-20 08:46:12 -04:00
Arkadiusz Lachowicz 0db2ea9704 ExternalData: Add configurable link materialization mode
Fixes: #27700
2026-03-19 17:34:08 +01:00
Brad King b6cb4b76eb Merge topic 'always-create-all-verify-targets'
d6ecae0600 VERIFY_*_HEADER_SETS: Create verification targets even when empty
2f96373389 cmGeneratorTarget: refactor header set verification to collect then create

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11807
2026-03-19 11:37:35 -04:00
Robert Maynard def035dafd cmake install: Allow no spaces between j and parallel count 2026-03-19 11:15:48 -04:00
Mickaël Germain 5278110386 CMakePresets: Add testPassthroughArguments to test presets
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
2026-03-18 21:40:05 -07:00
Brad King 6355164f10 Merge topic 'install-default-component-from-project'
accabeb272 install: Add option to use project name as default component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11811
2026-03-18 09:40:11 -04:00
Brad King 942ba51eed Merge topic 'preset-file-dir'
3c314349d5 presets: Evaluate `fileDir` macro ahead of schedule
e9abf0c7c8 presets: Allow macro expansion without a graph object
9c1931af44 presets: De-duplicate field inheritance

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11741
2026-03-18 09:36:23 -04:00
Mickaël Germain d6ecae0600 VERIFY_*_HEADER_SETS: Create verification targets even when empty
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
2026-03-17 20:42:00 -07:00
Robert Maynard accabeb272 install: Add option to use project name as default component
Teach `CMAKE_INSTALL_DEFAULT_COMPONENT_NAME` to accept a special
`<PROJECT_NAME>` placeholder.

Fixes: #27682
2026-03-17 10:33:44 -04:00
Brad King 20de3962f5 Merge topic 'ctest-passthrough-args'
b3980bf703 ctest: Add support for forwarding arguments to tests via --

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !11789
2026-03-17 09:20:59 -04:00
Brad King 88c6815f7e Merge topic 'ExternalData-state-dir'
079c86e0a4 ExternalData: Add relocatable state metadata

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11814
2026-03-17 09:15:02 -04:00
Tyler Yankee 3c314349d5 presets: Evaluate fileDir macro ahead of schedule
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
2026-03-17 08:16:50 -04:00
Brad King 0cbc778856 Merge topic 'ExternalProject-git-clone-retry'
0126cd7219 ExternalProject: Add options to configure git clone retries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11754
2026-03-16 09:38:29 -04:00
Arkadiusz Lachowicz 079c86e0a4 ExternalData: Add relocatable state metadata
Issue: #27689
2026-03-15 19:27:16 +01:00
Jérémie Dumas 0126cd7219 ExternalProject: Add options to configure git clone retries
Fixes: #24410
2026-03-15 09:06:47 -04:00
Mickaël Germain b3980bf703 ctest: Add support for forwarding arguments to tests via --
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
2026-03-13 16:21:02 -07:00
Daniel Pfeifer d7ab03d093 execute_process: Add options for modified environment 2026-03-12 19:17:24 +01:00
Brad King 942ec6308c Merge topic 'cmake-E-tar-encoding'
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
2026-03-12 13:58:40 -04:00
Brad King 647b075be0 Merge topic 'genex-TARGET_OBJECTS-SOURCE_FILES'
987e0af366 GenEx: Add `$<TARGET_OBJECTS:...>` option to filter on source files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11782
2026-03-11 13:17:00 -04:00
Brad King 911f44901b Merge topic 'verify-header-sets-objc'
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
2026-03-11 13:08:40 -04:00
Alex Overchenko 21eb53e9eb tar: Add option to specify the encoding of archive pathnames
Use OEM by default for backward compatibility

Fixes: #26903
2026-03-11 08:44:44 +03:00