Commit Graph
39450 Commits
Author SHA1 Message Date
Brad King ffe0edc092 Merge topic 'list-predicate'
15340d6a96 list(FILTER): Add PREDICATE mode
c7af6e94d8 list(TRANSFORM): Add PREDICATE selector
0f30e0fe1c Help: Fix indentation of list(FILTER) docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11945
2026-05-05 10:58:32 -04:00
Brad King bf3a43e4ad Merge topic 'JOB_POOL_COMPILE-FileSet-property'
8e6eec8125 FILE_SET: add JOB_POOL_COMPILE property support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12005
2026-05-05 10:55:51 -04:00
Brad King 885b588502 Merge topic 'SKIP_LINTING-FileSet-property'
f18ba89862 FILE_SET: add SKIP_LINTING property support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12004
2026-05-05 10:54:37 -04:00
Brad King 0469dc90c4 Merge topic 'cmake-diagnostics-check-order'
91e81bf262 Diagnostics: Ensure correct ordering
700f64cfb9 cmDiagnostics: Fix typo in source documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12002
2026-05-05 10:51:52 -04:00
Brad King 0daa41a8fd Merge topic 'presets-error-diagnostics'
654a195d8b presets: Improve error diagnostics
c6e81bf30e Help/presets: Disallow empty env keys in build presets also

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !11987
2026-05-05 10:50:28 -04:00
Brad King b0c1507fbf Merge topic 'fbuild_unity_exclude'
05ac9db640 FASTBuild: use UnityInputExcludedFiles for unity skips

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12003
2026-05-05 10:46:59 -04:00
Brad King a05a143930 Merge topic 'ci-fedora-44'
f95c3c1ac0 ci: Update Clang HIP/CUDA wrappers for C++ 26 with libstdc++ 16 on Fedora 44
22a0b461dc ci: use Fedora 44 images and environments
33421d31e3 ci: update Fedora base images to Fedora 44
5182cd415d ci: Update to BullseyeCoverage 9.25.1
2c3a9fcabe clang-tidy module: Update to build against LLVM/Clang 22
e9b6b15082 clang-tidy: ignore warnings new in version 22
9207cccc00 clang-tidy: fix modernize-make-unique lint
859c541be8 pre-commit: update to `typos` 1.45.2
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12008
2026-05-05 10:41:23 -04:00
Kitware Robot d78407d434 CMake Nightly Date Stamp 2026-05-05 00:06:11 -04:00
Brad King 9207cccc00 clang-tidy: fix modernize-make-unique lint 2026-05-04 18:58:59 -04:00
Brad King 8386ae08e1 LexerParser: Suppress gcc -Wunused-but-set-variable in generated code 2026-05-04 11:20:00 -04:00
Brad King 50e35d69c0 cmStringAlgorithms: Avoid -Wmaybe-uninitialized in cmAlphaNum constructor
The `string_view` constructor does not dereference its pointer before
we initialize the data, but the compiler doesn't know that.
2026-05-04 11:20:00 -04:00
Brad King 0c5bebf0ae cmSystemTools: Suppress clang-analyzer false positive
`clang-analyzer` cannot see that a moved-from value is re-assigned
via an output argument.
2026-05-04 11:20:00 -04:00
Eduard Voronkin 05ac9db640 FASTBuild: use UnityInputExcludedFiles for unity skips
Prefer it over `UnityInputIsolatedFiles` to enable caching for the
files.

Fixes: #27784
2026-05-04 11:00:38 -04:00
Brad King 1c4ef7291f Merge topic 'cmake-diagnostics-doc'
95f7f84609 Help: Fix CMD_INSTALL_ABSOLUTE_DESTINATION documentation
a882ec84ec cmDocumentation: Add diagnostics
97d13c3053 Help: Improve diagnostics documentation
3cccce8ca2 Help: Add developer documentation for new diagnostics
ffe4c2a8ff Help: Fix developer documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !11996
2026-05-04 10:32:28 -04:00
Brad King 871c7bcec2 Merge topic 'ctest-llvm-cov'
a7780d1b9c ctest: Add a `CoverageTool` setting to enable integration with `llvm-cov`
870d7d7cbe ctest: Introduce CTestDirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11891
2026-05-04 10:21:12 -04:00
Brad King ac04c630e9 Merge topic 'vs-fortran'
ec06d16178 cmSourceGroup: Constify clients
f513867bc4 VS: Fix regression causing source accumulation across Fortran projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11999
2026-05-04 10:10:10 -04:00
Marc Chevrier 8e6eec8125 FILE_SET: add JOB_POOL_COMPILE property support 2026-05-04 11:10:01 +02:00
Marc Chevrier f18ba89862 FILE_SET: add SKIP_LINTING property support 2026-05-04 10:16:06 +02:00
Kitware Robot 4cf5bc2a85 CMake Nightly Date Stamp 2026-05-04 00:06:32 -04:00
Kitware Robot 4cb93fdab6 CMake Nightly Date Stamp 2026-05-03 00:07:01 -04:00
Kitware Robot fd823e8f9f CMake Nightly Date Stamp 2026-05-02 00:04:58 -04:00
Mickaël Germain 15340d6a96 list(FILTER): Add PREDICATE mode 2026-05-01 18:55:07 -07:00
Mickaël Germain c7af6e94d8 list(TRANSFORM): Add PREDICATE selector
Add a new `PREDICATE` selector to `list(TRANSFORM)` that uses a
user-defined function or macro to decide which elements to transform.

The predicate callable receives each element value and an output
variable name.  It must set the output variable to a truthy or falsy
value in PARENT_SCOPE; only elements for which the predicate returns
true are passed to the transform action.

Adds a shared PredicateEvaluator helper class used by both TRANSFORM
PREDICATE and (in a subsequent commit) FILTER PREDICATE.

Includes parser wiring, error and success tests covering all existing
actions (TOUPPER, TOLOWER, REPLACE, STRIP, GENEX_STRIP, APPEND,
PREPEND, APPLY) combined with the PREDICATE selector.

Issue: #27761
2026-05-01 18:54:53 -07:00
Matthew Woehlke 91e81bf262 Diagnostics: Ensure correct ordering
Create a constexpr function that recursively validates that [a portion
of] the diagnostics tree is in proper depth-first order. Use this to
ensure at compile time that the diagnostics are, in fact, in the correct
order. This will make it harder to accidentally introduce order errors,
since any C++17 build will throw a compile error if the list is not
correctly ordered.
2026-05-01 14:49:11 -04:00
Matthew Woehlke 700f64cfb9 cmDiagnostics: Fix typo in source documentation 2026-05-01 13:56:57 -04:00
Richard 654a195d8b presets: Improve error diagnostics
Include the preset type when emitting generic error messages,
which avoids confusion over which preset is presenting problems
(e.g., if you you have a preset called "default" in each of the
configure, build, test, package and workflow preset types).

Include additional information about the specific error encountered
when processing a preset.

Fixes: #27774
2026-05-01 13:18:42 -04:00
Brad King ec06d16178 cmSourceGroup: Constify clients
The generators do not need to modify the groups.
2026-05-01 10:43:32 -04:00
Brad King f513867bc4 VS: Fix regression causing source accumulation across Fortran projects
Since commit de2afc5d53 (cmMakeFile: Remove source groups argument from
`FindSourceGroup`, 2025-11-07, v4.3.0-rc1~414^2~2) we share source group
assignments across targets to avoid copying and repeated work.  However,
the VS 7 generator, still used for Fortran, relies on per-target
per-group source lists.  Build them specifically for that case.

The deprecated Eclipse CDT4 extra generator had the same regression,
so fix it too.

Fixes: #27779
2026-05-01 10:42:55 -04:00
Brad King 096a676d13 Merge topic 'presets-file-arg'
95edd93948 presets: Support loading from arbitrary file
81c22a67b6 presets: Factor out command line arguments
e75b62fd73 presets: Convert allowNoFiles to enum class
8476469b72 Help: Add cmake-workflow-option role
5e76987626 Help/presets: Use preset role for configurePreset references
2d8e8213d4 Help/presets: Improve include field formatting
43f5fc8ac8 Help, Tests: Consolidate presets terminology and references
c49ebb67da Help: Use POSIX slashes for 'generated by' in presets files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11886
2026-05-01 09:22:20 -04:00
Kitware Robot da73081555 CMake Nightly Date Stamp 2026-05-01 00:06:14 -04:00
Matthew Woehlke a882ec84ec cmDocumentation: Add diagnostics
Teach cmDocumentation to provide help for diagnostics. Teach cmRST about
the new diagnostic role and directive.
2026-04-30 15:36:23 -04:00
Joseph Snyder a7780d1b9c ctest: Add a CoverageTool setting to enable integration with llvm-cov
Add a `CTEST_TEST_COVERAGE_TOOL` variable to tell CTest to integrate
with `llvm-cov` source-based code coverage by setting the
`LLVM_PROFILE_FILE` environment variable for each test.

Issue: #26932
2026-04-30 14:22:26 -04:00
Joseph Snyder 870d7d7cbe ctest: Introduce CTestDirectory
Introduce a new internal testProperty object called CTestDirectory.
This directory is originally set to the directory were the test was created,
but will not be overwritten when the WORKING_DIRECTORY property is
updated on the test.
2026-04-30 13:24:55 -04:00
Brad King a979d8eb3d Merge topic 'error_on_absolute_install_paths'
39a56136a3 Diagnostic: Add warn or error on absolute install paths
fd76089631 cmInstallFileSetGenerator: Only support per config Destination.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11882
2026-04-30 09:17:13 -04:00
Brad King e19a3b4742 Merge topic 'remove-MACROS-directory-property'
5f63b3c6b1 Remove MACROS directory property
c1379ef56a find_* commands: ensure correct checks for VALIDATOR option
37fae65a70 Store command type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11980
2026-04-30 09:12:34 -04:00
Brad King 2d4f8cbb48 Merge topic 'swift-output-file-map-copy-if-different'
feb5275c7a Swift/Ninja: Set copy-if-different on output-file-map.json

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11990
2026-04-30 09:09:35 -04:00
Brad King b22659fa9d Merge topic 'swift-ninja-emit-module-ordering'
d741a4fb90 Swift/Ninja: Serialize compile edge after emit-module within target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11989
2026-04-30 09:05:41 -04:00
Brad King 0470fd9084 Merge topic 'swift-emit-module-link-dep'
b8fedb5979 Swift/Ninja: Add link edge dependency on emit-module output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11985
2026-04-30 09:02:34 -04:00
Tyler Yankee 95edd93948 presets: Support loading from arbitrary file
Allow CMake, CTest, and CPack to read presets from a path given by
command-line argument instead of always requiring `CMakePresets.json`
or `CMakeUserPresets.json` in the source tree. This makes the presets
feature more extensible to cases in which the user doesn't have access
to the presets defined in the source tree (e.g., if the source tree is
not writable).

For now, there is no equivalent implementation of such an option in the
`cmake-gui`, nor for the recent presets functionality implemented in
`ctest_configure` and `ctest_build`.

Fixes: #27329
2026-04-30 08:04:26 -04:00
Tyler Yankee 81c22a67b6 presets: Factor out command line arguments
Create a separate hierarchy of classes to manage command-line arguments
for CMake presets to facilitate shared definitions across our programs.
2026-04-30 07:49:43 -04:00
Tyler Yankee e75b62fd73 presets: Convert allowNoFiles to enum class
This improves readability at the call site when "yes" is desired.
2026-04-30 07:49:42 -04:00
Tyler Yankee 43f5fc8ac8 Help, Tests: Consolidate presets terminology and references
References to `CMake[User]Presets.json` should correspond to behavior
pertaining to those files in particular, while references to presets
files generally should be disambiguated from that.

Re-spell "preset file" to "presets file" where applicable.

Make a few references to `cmake-presets(7)` more consistent.

Issue: #27329
2026-04-30 07:49:40 -04:00
Kitware Robot 8dcf5c632c CMake Nightly Date Stamp 2026-04-30 00:05:33 -04:00
Marc Chevrier 5f63b3c6b1 Remove MACROS directory property
It did not always contain all macros.
We have `if(COMMAND)` now instead.

Add policy CMP0217 for compatibility.

Fixes: #27765
2026-04-29 16:43:04 +02:00
Roman Lavrov d741a4fb90 Swift/Ninja: Serialize compile edge after emit-module within target
Since commit b6367f723b (Swift/Ninja: Emit modules separately from
compilation, 2026-04-10) the compile and emit-module edges share the
same -output-file-map, which references a single module-level
.swiftdeps file.  When ninja schedules both edges concurrently, both
swift invocations write that file and corrupt it.

Add the .swiftmodule output as an order-only dependency of the object
compile edge so the two edges within a target run sequentially.
Downstream targets are unaffected: they still unblock as soon as the
emit-module edge finishes, preserving cross-target parallelism.

Move the object-build WriteBuild call to after the emit-module block
so the order-only dep is added after modBuild is copied from objBuild,
avoiding a self-reference on the emit-module edge's own output.

Issue: #27748
2026-04-29 10:42:37 -04:00
Marc Chevrier c1379ef56a find_* commands: ensure correct checks for VALIDATOR option
Ensure, regardless where the command is defined, that a macro is not
accepted as value for VALIDATOR option.
2026-04-29 10:36:21 -04:00
Marc Chevrier 37fae65a70 Store command type
To enable checks on command type (i.e. macro or function).
2026-04-29 10:36:20 -04:00
Brad King f15a0ea5d4 Merge topic 'fix_potential_use_of_freed_stack_memory'
1304fb4027 PkgC: Make sure we don't use deleted stack objects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Vito Gamberini <vito.gamberini@kitware.com>
Merge-request: !11965
2026-04-29 10:30:39 -04:00
Brad King 33d4082c8b Merge topic 'swift-module-name-hyphen'
933c59ffde Swift: Replace hyphens with underscores in default module name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11986
2026-04-29 10:28:34 -04:00
Brad King 9bc3f3b5c8 Merge topic 'swift-emit-module-path-fix'
899f1496f8 Swift/Ninja: Fix emit-module-path clobbering on separate emit-module edge

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11984
2026-04-29 10:27:22 -04:00