Commit Graph

75452 Commits

Author SHA1 Message Date
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
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
3758f44d6e Merge topic 'arma-cleanup'
3f8daf0f1c FindArmadillo: Remove unnecessary setting of ARMADILLO_LIBRARY to empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12001
2026-05-04 10:27:52 -04:00
Brad King
7a5f1af235 Merge topic 'exe-result'
40ef8fd781 ProcessorCount: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11998
2026-05-04 10:25:11 -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
b3bbaf50b2 Merge branch 'release-4.3' 2026-05-04 10:10:10 -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
Brad King
0f55e1502c Merge topic 'vs-fortran' into release-4.3
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:06 -04: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
Ryan Curtin
3f8daf0f1c FindArmadillo: Remove unnecessary setting of ARMADILLO_LIBRARY to empty
This is not a typical pattern for find modules, and it breaks subsequent
calls to `find_package(Armadillo)`.

See also commit 38c6dd7b19 (FindArmadillo: Add support for non-wrapper
case, 2020-03-02, v3.18.0-rc1~594^2) and commit 6745af99c8 (FindArmadillo:
Fix wrapper linking with MSVC, 2025-02-05, v4.0.0-rc1~53^2).
2026-05-01 14:24:27 -04:00
Matthew Woehlke
95f7f84609 Help: Fix CMD_INSTALL_ABSOLUTE_DESTINATION documentation
CMD_INSTALL_ABSOLUTE_DESTINATION is a child of CMD_AUTHOR, but this was
not noted in the documentation. Add the missing annotation.
2026-05-01 13:00:10 -04:00
scivision
40ef8fd781 ProcessorCount: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
Fixes: #27780
Issue: #27782
2026-05-01 11:36:31 -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
Kyle Edwards
2aefa92f55 Merge topic 'findcudatoolkit-sanitizer-path-fix'
a83b2de6ce FindCUDAToolkit: Fix search for sanitizer in cross-compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !11995
2026-05-01 08:23: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
Matthew Woehlke
97d13c3053 Help: Improve diagnostics documentation
Make diagnostics into Sphinx objects so that they can be more readily
cross-referenced. (This is also needed to enable --help-diagnostic.)
Update various places that can make use of the same. Significantly
expand the documentation on controlling diagnostics.
2026-04-30 15:36:23 -04:00
Matthew Woehlke
3cccce8ca2 Help: Add developer documentation for new diagnostics
Add a developer-targeted document explaining the basics of how to use
CMake 4.4's new diagnostic framework.
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
Matthew Woehlke
ffe4c2a8ff Help: Fix developer documentation
HTML is not normally generated for developer documentation. As a result,
the validity of the reST is effectively never checked, and thus contains
a small handful of issues (mostly bad indent). Fix these.
2026-04-30 14:19:54 -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
Kyle Edwards
a83b2de6ce FindCUDAToolkit: Fix search for sanitizer in cross-compilation
In a cross-compilation environment, `CUDAToolkit_LIBRARY_ROOT` will
be relative to the nvcc executable, rather than the cudart library,
due to `version.json` being relative to nvcc. However,
`CUDAToolkit_LIBRARY_SEARCH_DIRS` will be set correctly, so use
`EXTRA_PATH_SUFFIXES` to search relative to each entry in the list.
2026-04-30 09:55:41 -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
Brad King
a258686cf4 Merge topic 'ci-pvs-studio'
7ddd46bb7b ci: Add PVS-Studio linting
b7105edd72 ci: Add scripts to install PVS-Studio in Linux jobs
3748deda58 pvs-studio: Add .pvsconfig exclusion file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11909
2026-04-30 08:58:11 -04:00
Brad King
2fc92847aa Merge topic 'ci-cmake-update'
2f2b0f04de ci: Update CMake version to 4.3.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11993
2026-04-30 08:52:42 -04:00
Brad King
9c6508228b Merge topic 'ci-rvm-source'
05bd3e5437 ci: Validate that the rvm-installer comes from the correct source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11988
2026-04-30 08:51:01 -04:00
Brad King
6dfc24b1cb Merge topic 'update-curl'
6187c3947b curl: Set build options the way we need for CMake
c5d7ca29f6 Merge branch 'upstream-curl' into update-curl
fe97809d5a curl 2026-04-29 (a05f3497)
ee7829d9c7 curl: Update script to get curl 8.20.0
61cba092a2 Tests: Update expected DNS resolution error message for curl 8.20

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11992
2026-04-30 08:48:08 -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
8476469b72 Help: Add cmake-workflow-option role 2026-04-30 07:49:42 -04:00
Tyler Yankee
5e76987626 Help/presets: Use preset role for configurePreset references 2026-04-30 07:49:41 -04:00
Tyler Yankee
2d8e8213d4 Help/presets: Improve include field formatting
Note the presets version which added it, and use the new `preset`
role when referencing it from other sections.
2026-04-30 07:49:40 -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
Tyler Yankee
c49ebb67da Help: Use POSIX slashes for 'generated by' in presets files 2026-04-30 07:49:39 -04:00
Kitware Robot
8dcf5c632c CMake Nightly Date Stamp 2026-04-30 00:05:33 -04:00
Brad King
7ddd46bb7b ci: Add PVS-Studio linting
It requires a license, so run it only in continuous and nightly
pipelines where we can make the license available.

Co-authored-by: Martin Duffy <martin.duffy@kitware.com>
2026-04-29 18:29:44 -04:00
Brad King
b7105edd72 ci: Add scripts to install PVS-Studio in Linux jobs 2026-04-29 18:22:36 -04:00
Martin Duffy
3748deda58 pvs-studio: Add .pvsconfig exclusion file 2026-04-29 18:22:33 -04:00
Brad King
2f2b0f04de ci: Update CMake version to 4.3.2 2026-04-29 14:34:05 -04:00