Commit Graph
9360 Commits
Author SHA1 Message Date
Brad King e012f62599 Merge topic 'FILE_SET-INDEPENDENT_FILES'
bc7d8bd26f FILE_SET: Add INDEPENDENT_FILES property for Ninja order dependency control

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11904
2026-04-13 11:03:06 -04:00
Brad King 8cd4e1576c Merge topic 'instrumentation-index-lock'
0c2fcaec5d instrumentation: Avoid duplicate entries on concurrent indexing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11912
2026-04-13 10:55:40 -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
Trung Nguyen 9a342eb39b Haiku: Add support for RESCAN
Haiku also uses the GNU toolchain and therefore should support this
feature.
2026-04-11 06:04:50 +10:00
Martin Duffy 0c2fcaec5d instrumentation: Avoid duplicate entries on concurrent indexing
When indexing occurs twice at exactly the same time, there was a possibility
for snippets to show up in more than one index file, and therefore to be
removed by one indexing process while another indexing process ran a user
callback which needed to read the file.

Add a file locking mechanism around indexing to prevent it from happening
concurrently within a project build tree.

Fixes: #27741
2026-04-10 14:06:38 -04:00
Brad King 95a07e2fc6 Merge topic 'rework-presets-docs'
46ede9b46d Help: Add `preset` role
f26e9fcbae Help: Generate presets JSON schema, documentation
b96826bc08 Help: Improve abbreviated command-line option roles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11884
2026-04-10 11:54:14 -04:00
Brad King 9ec879524a Merge topic 'doc-lang-link-flags'
c8b6725977 Help: Mention CMAKE_<LANG>_LINK_FLAGS where relevant

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11905
2026-04-10 11:33:46 -04:00
Matthew Woehlke 46ede9b46d Help: Add preset role
Add a new CMake domain role for referencing fields in CMake presets.
This has two main purposes. First, it replaces generic references (which
were excessively long and required explicit titles) and acts as an
improved version of the `ref` role by allowing the always-present
`CMakePresets.` prefix to be elided. Second, unlike generic references
which silently degrade to broken links that are only caught by
`linkcheck`, broken references are flagged immediately in regular Sphinx
builds. Therefore, this both improves presentation by bringing line
lengths back under control, and reduces errors by making bad references
immediately detectable.

There is also a small change in rendering, as field references are now
rendered as literals. This is consistent with how fields are mentioned
in prose when they are not linked.
2026-04-08 12:14:41 -04:00
Matthew Woehlke f26e9fcbae Help: Generate presets JSON schema, documentation
Replace the CMake presets schema.json with a YAML document, from which
both the JSON schema and (most of) the reST documentation are generated.
This achieves three main goals. First, the YAML document is much closer
to being human-readable than the JSON schema. Second, the JSON and reST
prose (when the latter differs) are contained in the same file, in most
cases adjacent (and at worst, still nearby) rather than in separate
files, which should greatly facilitate keeping the two in sync. Third,
changes are monumentally easier, as changes merely need to annotate the
version(s) to which variants apply, rather than creating entirely
separate schema trees for each variant.

Since requiring Python as part of the build process is not desired,
the outputs are kept in the source repository. This is consistent with
other areas which are seldom updated and require special tools, such as
the lexer.

While this does not represent any functional change for users, some
grammatical edits and other such editorial improvements have been made
in the process of transferring everything to the new YAML. However,
these are mainly incidental rather than representative of an attempt at
a thorough editorial pass.

Finally, for clarity, monkey-patch `sphing.domains.changesets` and add
additional 'version modified' directives with slightly tweaked text to
identify changes to the presets schema. These are nearly identical to
the built-in directives, but use the text 'in presets version N' rather
than 'in version N[.N]'.
2026-04-08 10:45:21 -04:00
Tyler Yankee c8b6725977 Help: Mention CMAKE_<LANG>_LINK_FLAGS where relevant
Also, correct the documentation added in commit 98f9874703 (cmake:
Add per-language link flags for all target types, 2025-12-17) by
placing the variables in the proper section of cmake-variables(7).

Issue: #21934
2026-04-07 10:14:28 -04:00
Brad King b73e1508ec Merge topic 'FILE_SET-CXX_SCAN_FOR_MODULES'
df0a2aca6d FILE_SET: Add CXX_SCAN_FOR_MODULES property for per-file-set scanning control

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !11890
2026-04-04 15:36:19 -04:00
Brad King bff90ab59e Merge topic 'doc-if'
6ff2057b93 Help/if: Improve formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11895
2026-04-04 15:34:08 -04:00
Tyler Yankee 6ff2057b93 Help/if: Improve formatting
Consolidate the description of precedence during evaluation. Use xrefs
to improve syntax highlighting. Remove an outdated `versionadded`
directive for CMake 2.6.
2026-04-03 09:36:04 -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
Brad King 1efc5daef9 Merge topic 'doc-instrumentation-google-trace'
e056f53500 Help: Fix path to Google Trace File in cmake-instrumentation(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11892
2026-04-02 18:00:53 -04:00
Brad King e056f53500 Help: Fix path to Google Trace File in cmake-instrumentation(7)
Fix commit b8d8faf900 (Help/instrumentation: Improve CMake
Instrumentation documentation, 2026-03-24, v4.3.1~4^2).

Fixes: #27734
2026-04-02 13:09:37 -04:00
Brad King ad50d3e3d8 Merge topic 'short-cmake-option-refs'
3d82ccbe0d Help: Add roles to abbreviate command-line options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11883
2026-04-01 13:41:12 -04:00
Brad King 5e57306864 Merge topic 'FILE_SET-SOURCES'
c386aaebf8 FILE_SET: install and export SOURCES file set type
5c5b68f44e FILE_SET: Add support for the SOURCES type
5697bcced0 BT<> and cmLocalGenerator: Add helpers functions
42ca2a2062 cmEvaluatedTargetProperty: put declarations in namespace cm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11863
2026-04-01 13:39:12 -04:00
Brad King e8f5af42b5 Merge topic 'help-testdir'
67c84ef103 Help: Indicate that `ctest --test-dir` may be specified with a preset
02e9335d9c Help: Document that `cmake --preset` supports `-B` to override the build dir
c288ecddb2 Help: Revise versioning note for `cmake --build` with both dir and preset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11880
2026-04-01 13:36:06 -04:00
Matthew Woehlke 3d82ccbe0d Help: Add roles to abbreviate command-line options
Add a handful of helper roles that allow many more command-line option
references to be written without explicit targets. Specifically, what
used to be written ':option:`--foo[=bar] <program --foo>` can now be
written ':program-option:`--foo`'. This allows many such references to
be significantly shortened.

For now, supported programs are 'cmake', 'cpack'. 'ctest',
'cmake--build' and 'cmake--install', which should cover most cases, but
more can be trivially added. Additionally, this does not make a
concerted effort to replace all existing uses, as it is intended mainly
for use in future updates.
2026-03-31 12:56:16 -04:00
scivision 67c84ef103 Help: Indicate that ctest --test-dir may be specified with a preset
In commit c971212703 (ctest: Allow --test-dir override when using
presets, 2024-04-20, v3.30.0-rc1~200^2) we forgot to update the docs.
2026-03-31 09:38:05 -04:00
scivision 02e9335d9c Help: Document that cmake --preset supports -B to override the build dir 2026-03-31 09:37:54 -04:00
Brad King c288ecddb2 Help: Revise versioning note for cmake --build with both dir and preset
Indent docs from commit 19296f507d (cmake --build: Allow CLI build dir
to override presets, 2025-11-17, v4.3.0-rc1~472^2) inside the `--preset`
option documentation.
2026-03-31 09:36:38 -04:00
Marc Chevrier c386aaebf8 FILE_SET: install and export SOURCES file set type 2026-03-31 09:50:09 +02:00
Marc Chevrier 5c5b68f44e FILE_SET: Add support for the SOURCES type
Fixes: #27550
2026-03-31 09:49:59 +02:00
Brad King 5eab2214a2 Merge topic 'rust-edition'
abe64ca2d3 Rust: Update experimental UUID
313769e766 Rust: Add support for Rust editions with Rust_EDITION target property
d0e39096b6 Rust: Fix unused import warning in RustOnly test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11852
2026-03-30 08:32:37 -04: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
Brad King c1c6b13eb3 Merge branch 'release-4.3' 2026-03-27 09:36:09 -04:00
Brad King 3a7d797d5b CMake 4.3.1 2026-03-27 09:08:31 -04:00
Brad King 73763b86ea Merge branch 'release-4.2' 2026-03-27 09:02:29 -04:00
Brad King 9d6a1dbec6 Merge branch 'release-4.2' into release-4.3 2026-03-27 09:02:10 -04:00
Brad King cfbb1649dd CMake 4.2.4 2026-03-27 08:25:44 -04:00
Brad King 7a8f6cc160 Merge topic 'discover-tests'
4e34426fb3 TestDriver: Add '-N' option to print all tests
b7f83c37a4 create_test_sourcelist: Document command line arguments
8600ce6547 discover_tests: Add documentation
969999fa9f discover_tests: Add tests
3947842733 discover_tests: Add CMake command implementation
3f1fce6b48 discover_tests: Add CTest command implementation
d718a979b7 cmTestGenerator: Allow to be inherited from

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11758
2026-03-27 07:38:38 -04:00
Brad King 0e47cd8c7b Merge topic 'bmi-only-command-template'
7ebb5687ab cmGeneratorTarget: use typename for `flag`
4a4986d28a cxxmodules: support command templates for BMI compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11871
2026-03-27 07:36:26 -04:00
Brad King f7eff87604 Merge topic 'bmi-only-command-template' into release-4.3
7ebb5687ab cmGeneratorTarget: use typename for `flag`
4a4986d28a cxxmodules: support command templates for BMI compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11871
2026-03-27 07:36:24 -04:00
Brad King 2250c5e1f1 Merge topic 'tutorial'
53a2a77d19 Tutorial: Add missing entry in Step4 file list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11873
2026-03-27 07:34:17 -04:00
Baudouin Feildel abe64ca2d3 Rust: Update experimental UUID 2026-03-26 23:15:58 +01:00
Baudouin Feildel 313769e766 Rust: Add support for Rust editions with Rust_EDITION target property 2026-03-26 23:15:58 +01:00
Gustaf Borgström 53a2a77d19 Tutorial: Add missing entry in Step4 file list
The root's `CMakeLists.txt` is also one of the files the need editing in
Exercise 1, but was missing.
2026-03-26 13:38:29 -04:00
Ben Boeckel 4a4986d28a cxxmodules: support command templates for BMI compilation
Some compilers (Clang) warn when using their BMI-only flag with `-c`.
Support a complete template for BMI compilation rather than an
additional flag to support such toolchains.

Fixes: #27600
2026-03-26 13:20:19 -04:00
Daniel Pfeifer 4e34426fb3 TestDriver: Add '-N' option to print all tests 2026-03-26 10:36:22 -04:00
Daniel Pfeifer b7f83c37a4 create_test_sourcelist: Document command line arguments 2026-03-26 10:36:22 -04:00
Daniel Pfeifer 8600ce6547 discover_tests: Add documentation 2026-03-26 10:36:22 -04:00
Brad King 79d2bd9f86 Merge topic 'help-prop'
917678157d Help: Note that generator expressions are supported only where documented

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11869
2026-03-26 10:23:07 -04:00
Brad King 811768e742 Merge topic 'file-archive-path-encoding'
97455c3d7e file: Add `ARCHIVE_*` options to specify pathname encoding
25af9288f9 Tests/RunCMake/File_Archive: Match expected errors more extensibly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11853
2026-03-26 10:20:04 -04:00
Brad King 36e0b1a60a Merge topic 'instrumentation-doc-improve'
b8d8faf900 Help/instrumentation: Improve CMake Instrumentation documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11861
2026-03-26 10:16:37 -04:00
Brad King 8f55f50b34 Merge topic 'instrumentation-doc-improve' into release-4.3
b8d8faf900 Help/instrumentation: Improve CMake Instrumentation documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11861
2026-03-26 10:16:35 -04:00
scivision 917678157d Help: Note that generator expressions are supported only where documented
Issue: #27718
2026-03-25 13:36:22 -04:00
Martin Duffy b8d8faf900 Help/instrumentation: Improve CMake Instrumentation documentation
Fixes: #27688
2026-03-24 17:09:38 -04:00
AJIOB 97455c3d7e file: Add ARCHIVE_* options to specify pathname encoding
Issue: #26903
2026-03-24 14:07:21 -04:00