9648 Commits

Author SHA1 Message Date
Brad King
23c5b40924 Merge topic 'fastbuild-test-deps'
2d417b9371 FASTBuild: Generate test_prep/ targets for test build dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12183
2026-06-24 09:54:39 -04:00
Brad King
4073b18ab7 Merge topic 'source_group-FILE_SET-support'
6043014d1d source_group(): Add file set support
44fd6ec551 source_group: use cmArgumentParser

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12195
2026-06-24 09:49:49 -04:00
Martin Duffy
2d417b9371 FASTBuild: Generate test_prep/ targets for test build dependencies
Issue: #27879
2026-06-23 12:20:49 -04:00
Brad King
cd5a8dfa8e Merge topic 'genex-list-transform-apply'
0f6e8ded1d GenEx: add $<LIST:TRANSFORM,...,APPLY,body> action
c0a0b7fdd9 GenEx: add bound-operand binding mechanism and $<_0>
caa51f5689 GenEx: factor TRANSFORM selector parsing and selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12203
2026-06-23 10:17:50 -04:00
Marc Chevrier
6043014d1d source_group(): Add file set support 2026-06-23 14:55:26 +02:00
Brad King
dfd1cf8d87 Merge topic 'import-std-refactor'
42d2d63235 c++modules: Copy props from BMI consumers more correctly
6d3e9d8220 c++modules: single import std target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !12193
2026-06-22 18:21:02 -04:00
Brad King
5ffed8c938 Merge topic 'tutorial-typos'
abee191e93 Help/tutorial: reword Installation Commands intro
15bd933fc4 Help/tutorial: fix minor typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vito Gamberini <vito.gamberini@kitware.com>
Acked-by: Betsy McPhail <betsy.mcphail@kitware.com>
Merge-request: !12199
2026-06-22 18:19:11 -04:00
Aiden Woodruff
abee191e93 Help/tutorial: reword Installation Commands intro
Signed-off-by: Aiden Woodruff <aiden.woodruff@kitware.com>
2026-06-22 12:08:38 -04:00
Aiden Woodruff
15bd933fc4 Help/tutorial: fix minor typos
Signed-off-by: Aiden Woodruff <aiden.woodruff@kitware.com>
2026-06-22 12:08:38 -04:00
Mickaël Germain
0f6e8ded1d GenEx: add $<LIST:TRANSFORM,...,APPLY,body> action
Add an APPLY action to $<LIST:TRANSFORM> that evaluates an arbitrary <body>
once per selected element, with $<_0> bound to the element, so a list can be
mapped through any generator expression at generate time.  Unlike the
configure-time list(TRANSFORM ... APPLY <function>) command, the genex form has
no side effects and returns the body's value directly, and a list-valued result
expands into multiple elements.

The body evaluates in its own binding scope, so nested APPLY actions can shadow
$<_0>, and context-sensitive state it observes (such as target dependencies)
still propagates to the enclosing expression.  APPLY accepts the same
AT/FOR/REGEX selectors as the canned actions.

Issue: #27892
2026-06-21 18:05:53 -07:00
Mickaël Germain
c0a0b7fdd9 GenEx: add bound-operand binding mechanism and $<_0>
Introduce "binding operations": generator expressions that evaluate a <body>
once for each value they supply, with $<_0> expanding to that value.  This is
the foundation the $<LIST:TRANSFORM,...,APPLY> action and the predicate
selectors build on, letting a <body> refer to the element being processed.

Using $<_0> outside a binding operation is reported as an error rather than
silently expanding to nothing.

Issue: #27892
2026-06-20 12:32:30 -07:00
Brad King
e6e3d728e9 Merge topic 'instrumentation-interrupt'
bda67b82e7 instrumentation: Write cmakeBuild snippet when build is interrupted
b801e7c78d instrumentation: Bump data version to 1.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !12154
2026-06-19 10:02:06 -04:00
Brad King
65269f4dfc Merge topic 'instrumentation-doc-version-fix'
330b36dddc instrumentation: Fix stale version references in documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12188
2026-06-19 09:58:52 -04:00
Vito Gamberini
6d3e9d8220 c++modules: single import std target 2026-06-18 15:20:54 -04:00
Brad King
2f27812939 Merge topic 'ninja-BUILDING_INTRINSIC_MODULES'
0e142193ac Ninja: Honor Fortran_BUILDING_INTRINSIC_MODULES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12186
2026-06-18 11:17:28 -04:00
Brad King
0060cb72e8 Merge topic 'function-argnc'
82c9d33e96 function: Set variable ARGNC
d14d0b0b23 function: Change arguments documentation to a definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12173
2026-06-18 11:14:48 -04:00
Brad King
edb85664e2 Merge topic 'file-archive-create-patterns-exclude'
9800bd2098 file(ARCHIVE_CREATE): Add PATTERNS_EXCLUDE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12179
2026-06-18 11:13:03 -04:00
Brad King
fcc9b7779b Merge topic 'spdx_license'
b533f229b8 cmSbom: Generate SPDX data denoting project licenses

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12133
2026-06-18 11:11:29 -04:00
Daksh Mamodiya
330b36dddc instrumentation: Fix stale version references in documentation
Four per-format version descriptions in cmake-instrumentation.7.rst
still claimed the data version is always 1.0, contradicting both the
authoritative Data Version paragraph (which says 1.1) and the JSON
schemas (which accept minor versions 0 and 1).

Replace the hardcoded version claims with a reference to the Data
Version section, so these lines remain correct as future minor
versions are added without requiring additional doc updates.

Fixes: #27889
2026-06-18 16:47:52 +02:00
Daksh Mamodiya
bda67b82e7 instrumentation: Write cmakeBuild snippet when build is interrupted
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
2026-06-18 15:38:43 +02:00
Daksh Mamodiya
b801e7c78d instrumentation: Bump data version to 1.2
Raise the maximum supported data version and the version CMake writes in
its snippet files from 1.1 to 1.2.
2026-06-17 18:24:25 +02:00
Michael Kruse
0e142193ac Ninja: Honor Fortran_BUILDING_INTRINSIC_MODULES
In commit b65930a7a7 (Fortran: Add Fortran_BUILDING_INTRINSIC_MODULES
for building intrinsics, 2025-01-09, v4.0.0-rc1~223^2) we only
implemented the property for the Makefile generators.  Implement it
for the Ninja generators too.

Fixes: #26803
2026-06-17 10:47:10 -04:00
Brad King
56ee80add0 Merge branch 'release-4.3' 2026-06-17 10:22:15 -04:00
Brad King
672ddaa5b7 Merge branch 'release-4.3' into release-4.4 2026-06-17 10:22:00 -04:00
Brad King
c2fd48014f CMake 4.3.4 2026-06-17 09:53:06 -04:00
Brad King
c2b7034f72 Merge branch 'release-4.2' 2026-06-17 09:40:47 -04:00
Brad King
0e9598ba0e Merge branch 'release-4.3' into release-4.4 2026-06-17 09:40:23 -04:00
Brad King
8cf3d277b7 Merge branch 'release-4.2' into release-4.3 2026-06-17 09:40:16 -04:00
Brad King
24581cbe98 CMake 4.2.7 2026-06-17 09:01:47 -04:00
Brad King
21769c177b Merge topic 'if-diagnostic'
597c573d7d if: Add `DIAGNOSTIC <category>` condition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12181
2026-06-17 08:54:50 -04:00
Brad King
d20e909f3d Merge topic 'if-diagnostic' into release-4.4
597c573d7d if: Add `DIAGNOSTIC <category>` condition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12181
2026-06-17 08:54:47 -04:00
Matthew Woehlke
597c573d7d if: Add DIAGNOSTIC <category> condition
Add an existence check to the `if` command for diagnostic categories,
mirroring the check for policies. Aside from being desirable for
consistency's sake, this will make it easier for users to write logic to
manipulate diagnostics from newer versions of CMake that don't exist
today.
2026-06-16 15:14:13 -04:00
Brad King
e87b932007 Merge topic 'instrumentation-snippet-schema'
bf71991174 instrumentation: Add JSON schema for snippet files
b736acdc3b Tests/instrumentation: Check errors for query schema validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12170
2026-06-16 10:24:32 -04:00
Daksh Mamodiya
9800bd2098 file(ARCHIVE_CREATE): Add PATTERNS_EXCLUDE option
Exclude files and directories matching the given patterns while creating
an archive, using libarchive's matcher for parity with file(ARCHIVE_EXTRACT).

Fixes: #27877.
2026-06-16 15:33:06 +02:00
Daniel Tierney
b533f229b8 cmSbom: Generate SPDX data denoting project licenses 2026-06-15 14:40:26 -04:00
Arha Gatram
82c9d33e96 function: Set variable ARGNC 2026-06-15 10:54:48 -07:00
Arha Gatram
d14d0b0b23 function: Change arguments documentation to a definition list 2026-06-15 10:54:48 -07:00
Tyler Yankee
bf71991174 instrumentation: Add JSON schema for snippet files
Issue: #27504
2026-06-15 10:35:53 -04:00
Brad King
cf38d13311 Merge topic 'instrumentation-data-version-minor'
5405a8a7e3 Help: Add release note for the instrumentation version format change in 4.3.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Tyler Yankee <tyler.yankee@kitware.com>
Merge-request: !12168
2026-06-15 10:29:30 -04:00
Brad King
09b9fc300b Merge topic 'instrumentation-data-version-minor' into release-4.4
5405a8a7e3 Help: Add release note for the instrumentation version format change in 4.3.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Tyler Yankee <tyler.yankee@kitware.com>
Merge-request: !12168
2026-06-15 10:29:28 -04:00
Brad King
ec22dd0de3 Merge topic 'ctest_configure_preset_binarydir'
3b6247a148 ctest: Honor preset binaryDir for initial configuration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12167
2026-06-15 10:23:55 -04:00
Zack Galbreath
3b6247a148 ctest: Honor preset binaryDir for initial configuration
Prior to this commit, ctest would sometimes use the current working directory
as its binary directory rather than honoring `binaryDir` from a configure
preset. This would occur when using ctest in dashboard client mode to perform
an initial configuration with a preset.

  `ctest --source-dir=<dir> -T Configure -D CTEST_PRESET=<preset>`

An explicit `--build-dir` still takes precedence over the preset's `binaryDir`.
2026-06-13 08:50:33 -04:00
Brad King
efe56769ba Merge topic 'file-curl-errors'
1f32d51dbb Help/file: Reference curl documentation for error codes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12164
2026-06-12 09:37:51 -04:00
Brad King
debf2cc365 Merge topic 'file-archive-extract-extend'
531f3b568c file(ARCHIVE_EXTRACT): Add PATTERNS_EXCLUDE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !12163
2026-06-12 09:28:58 -04:00
Brad King
5405a8a7e3 Help: Add release note for the instrumentation version format change in 4.3.4
This was missed in commit df36317176 (instrumentation: Revise Data
Version format, 2026-05-29, v4.4.0-rc1~43^2^2).

Closes: #27870
2026-06-12 09:22:55 -04:00
Tyler Yankee
1f32d51dbb Help/file: Reference curl documentation for error codes
Fixes: #27866
2026-06-11 13:47:24 -04:00
Brad King
491387f096 Merge topic 'cuda-add-std23-nvcc-support'
d01c9a429b CUDA: Add support for cuda_std_23 for nvcc 13.3+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12162
2026-06-11 10:25:33 -04:00
Brad King
cd7328bd29 Merge topic 'cuda-add-std23-nvcc-support' into release-4.4
d01c9a429b CUDA: Add support for cuda_std_23 for nvcc 13.3+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12162
2026-06-11 10:25:32 -04:00
Brad King
6f985e9c00 Merge topic 'instrumentation-ftime-trace'
576471ba47 Help/instrumentation: Add release notes for instrumentation data version 1.1
0480222ff4 instrumentation: Add compileTrace option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12048
2026-06-11 10:16:58 -04:00
Brad King
8d4479c2f9 Merge topic 'instrumentation-ftime-trace' into release-4.4
576471ba47 Help/instrumentation: Add release notes for instrumentation data version 1.1
0480222ff4 instrumentation: Add compileTrace option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12048
2026-06-11 10:16:57 -04:00