Commit Graph

1395 Commits

Author SHA1 Message Date
Brad King
92fbd6d0e0 Merge topic 'reduce-utf-8'
96b3a4e6c7 Style: Replace some UTF-8 characters with ASCII equivalents

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12319
2026-07-27 09:56:23 -04:00
Brad King
96b3a4e6c7 Style: Replace some UTF-8 characters with ASCII equivalents 2026-07-24 09:55:14 -04:00
Brad King
4212dce181 Merge topic 'doc-ide-compiler-selection'
90e2a33dba Help/CMAKE_LANG_COMPILER: Document Visual Studio, Xcode, GHS generators quirks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12296
2026-07-22 09:52:31 -04:00
leha-bot
90e2a33dba Help/CMAKE_LANG_COMPILER: Document Visual Studio, Xcode, GHS generators quirks
They don't support setting compiler via this variable, they use the
toolsets, so you could switch the compiler by choosing another toolset.

Closes: #21644
2026-07-21 17:39:07 -04:00
Brad King
5b0aee4961 Drop Visual Studio 14 2015 generator
This generator has been deprecated since CMake 4.2.  Remove it.
2026-07-03 11:53:32 -04:00
Daksh Mamodiya
503bdb9777 Makefile: Generate test_prep targets for CMAKE_TEST_BUILD_DEPENDS
Extend the test_prep/<test> and test_prep/all build targets, generated
from add_test(BUILD_DEPENDS) when CMAKE_TEST_BUILD_DEPENDS is enabled, to
the Makefile generators.  Previously only the Ninja and FASTBuild
generators provided them.

Resolve each test's dependencies in a shared layer so all command-line
generators consume one result.  cmTestGenerator now filters target
dependencies to build-system targets and records, for each file
dependency, the single target that produces it as a primary
custom-command output (cmGlobalGenerator::FindOutputOwningTarget).  The
Makefile generators emit phony rules in CMakeFiles/Makefile2 depending on
<target>.dir/all, with top-level forwarding rules.  Sharing the
resolution also stops Ninja and FASTBuild from emitting a dead test_prep
edge for a non-buildable (e.g. INTERFACE) BUILD_DEPENDS target.

On the Makefile generators a file dependency that no single target
produces, and a test whose name contains ':', cannot be expressed as a
recursive-make rule and are reported with a warning and skipped.

Fixes: #27879
2026-06-24 17:24:54 +02: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
4969297469 IBMFlang: Rename compiler id from IBMLLVMFlang
Rename the compiler id from commit ee76398d23 (IBMLLVMFlang: Add support
for this compiler, 2026-05-25) to mention only the direct vendor, IBM.

Issue: #27863
2026-06-09 08:14:23 -04:00
Brad King
1081423099 Merge topic 'doc-message-log-level' into release-4.4
ef5e1e3a5b Help: Fix references to cmake_language(GET_MESSAGE_LOG_LEVEL)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12144
2026-06-05 09:25:00 -04:00
Brad King
635b42c3ff Merge topic 'ibm-flang'
ee76398d23 IBMLLVMFlang: Add support for this compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12138
2026-06-04 10:09:27 -04:00
Tyler Yankee
ef5e1e3a5b Help: Fix references to cmake_language(GET_MESSAGE_LOG_LEVEL)
While we're at it, use the new `:cmake-option:` role to shorten some
references to `--log-level`.
2026-06-04 09:03:55 -04:00
Kelvin Li
ee76398d23 IBMLLVMFlang: Add support for this compiler
Add support for the `ibm-flang` compiler tool, a variant of LLVMFlang.

Closes: #27863
2026-06-03 18:35:46 -04:00
Zack Galbreath
a798a84b22 ctest: add new variable CTEST_SUBMIT_PARTS
This new variable allows dashboard client users to specify what parts
to submit.
2026-06-03 10:45:42 -04:00
Tyler Yankee
1bc30bd30d Help/ctest: Improve formatting of dashboard options
We must differentiate between the `ctest -D` dashboard and `ctest -D`
variable options.
2026-06-02 13:49:16 -04:00
Brad King
0e6299c37f Merge topic 'ctest_preset_args_cli'
63b6e7d785 ctest: allow dashboard clients to specify presets via variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12109
2026-05-28 09:50:49 -04:00
Brad King
df42ad80d3 Merge topic 'test-deps'
ba6b6fbc24 Ninja: Add Build Dependencies for Tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11935
2026-05-27 11:41:41 -04:00
Zack Galbreath
63b6e7d785 ctest: allow dashboard clients to specify presets via variables
Add variables to support specifying PRESET and PRESETS_FILE to
dashboard clients from the command-line.
2026-05-27 09:33:06 -04:00
Brad King
9000ffa974 Merge topic 'ctest_cli_define_script_vars'
2e214f0a5b ctest: allow CTest Script variables to be set via the command-line
21b9c20592 ctest: extend config mapping to include script-only variables
68489471a6 ctest: refactor SetCMakeVariables to use a mapping table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12060
2026-05-26 16:15:59 -04:00
Martin Duffy
ba6b6fbc24 Ninja: Add Build Dependencies for Tests
Add `test_prep/<test_name>` convenience targets to the ninja generator
to build dependencies of tests, and `test_prep/all` to build the dependencies
of all tests.

Build dependencies of a test include:
- Executables directly invoked by test `COMMAND`.
- Targets mentioned in generator expressionf os test `COMMAND`.
- Anything explicitly listed with the new `BUILD_DEPENDS` argument of `add_test`.

Issue: #27613
2026-05-26 15:16:19 -04:00
Brad King
090e754a34 PellesC: Document support for this compiler
This was left out of commit b7a5f2732d (PellesC: Add minimal support for
this C compiler, 2026-04-03) because the implementation was not usable
in general.  It is now.

Closes: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-05-15 12:06:46 -04:00
Zack Galbreath
2e214f0a5b ctest: allow CTest Script variables to be set via the command-line
Allow CTEST_* variables to be defined on the command-line when using
`ctest -T`.

Fixes: #27788
2026-05-14 11:37:57 -04:00
Brad King
61680b3b44 Merge topic 'cmake-diagnostics-variables'
72e7305c3e Diagnostics: Handle CMAKE_{WARN,ERROR}_DEPRECATED
be057c5a01 cmVariableWatch: Use enum for access type
cba542f32c cmake.cxx: Organize includes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11948
2026-05-08 07:44:05 -04:00
Matthew Woehlke
72e7305c3e Diagnostics: Handle CMAKE_{WARN,ERROR}_DEPRECATED
Update documentation for aforementioned variables, as their use is
deprecated under the new diagnostic system. Introduce a policy which
reintroduces their use to control specific deprecation diagnostics if
the policy is not NEW.

Note that this means there is NO synchronization between the variables
and the new diagnostic state.
2026-05-07 11:07:27 -04:00
Brad King
bfeef792bb Merge topic 'openwatcom-linker-id'
2e549c1df4 CMakeDetermineLinkerId: support the OpenWatcom linker ID

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12012
2026-05-06 10:21:23 -04:00
Ben Boeckel
2e549c1df4 CMakeDetermineLinkerId: support the OpenWatcom linker ID 2026-05-05 12:24:59 -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
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
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
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
Robert Maynard
39a56136a3 Diagnostic: Add warn or error on absolute install paths
Add `-Winstall-absolute-destination` diagnostic to warn or
error when an install command has an absolute destination.

This allow projects to enforce the best practice of not allowing
absolute install DESTINATIONS.
2026-04-29 09:22:29 -04:00
Roman Lavrov
b6367f723b Swift/Ninja: Emit modules separately from compilation
Add policy CMP0215 to emit `.swiftmodule` from a dedicated `-emit-module`
build edge for importable Swift targets in the Ninja generator.
Downstream targets can begin compiling as soon as the module interface
is ready, overlapping with upstream object compilation and linking.

When CMP0215 is NEW and CMP0157 is NEW, separate module emission is
enabled by default.  The `Swift_SEPARATE_MODULE_EMISSION` target
property (initialized by the `CMAKE_Swift_SEPARATE_MODULE_EMISSION`
variable) can override this per target.

The compile edge still passes `-emit-module` so that swiftc continues
to produce `.swiftdoc`; only the `.swiftmodule` output moves to the new
edge.

Also fix swiftmodule dependency edges in cmNinjaNormalTargetGenerator
to use IsLanguageUsed instead of GetLinkerLanguage, so C/C++ targets
whose linker language propagated to Swift do not produce spurious
implicit dependencies.

Closes: #27748
2026-04-24 15:58:18 -04:00
Marc Chevrier
e96c5ba13d Add the support of the wild linker
Fixes: #27755
2026-04-23 16:21:30 +02:00
Brad King
111454d8e0 Merge topic 'cmake-diagnostics-state'
99318e49b9 Help: Mention when diagnostics were added
daec98ba61 Diagnostics: Fix passing diagnostic state to try_compile
e0b0ac4295 Diagnostics: Overhaul warnings in cmake-gui
ca5d569524 Diagnostics: Switch state to new system
618c074a8c Diagnostics: Use categories for presets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11855
2026-04-15 10:29:06 -04:00
Matthew Woehlke
ca5d569524 Diagnostics: Switch state to new system
Add an additional state to the cmake instance to track diagnostics. Use
this to initialize any new/reset states we create so that other contexts
will inherit the diagnostic state from presets / command-line options.
Modify the front-end to map presets and -W command-line options to
manipulation of this new diagnostic state. Remove old members for
storing diagnostic state. Rework how diagnostic state is persisted.
Deprecate old, non-standard spellings for manipulating diagnostics.
Deprecate old 'dev' spelling for CMD_AUTHOR.

Note that this is a work in progress. Messaging has not yet been
updated, so the new state is not yet being used to control diagnostics,
and some of the logic to update the old state has been stripped (and
will eventually be removed entirely). Backward compatibility support for
the deprecated CMAKE_{WARN,ERROR}_DEPRECATED variables is only partially
implemented. The GUI's interface for manipulating warnings is partially
broken and needs to be overhauled. These tasks are being done in
separate commits in order to minimize review burden and keep the changes
per commit / per merge request more manageable.
2026-04-14 12:42:33 -04: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
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
Baudouin Feildel
313769e766 Rust: Add support for Rust editions with Rust_EDITION target property 2026-03-26 23:15:58 +01: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
eaecd6445b Merge topic 'import-std-experimental'
c1d58d3f3d Experimental: Restore `import std` gate
2e29354040 Experimental: Restore documentation link to CPS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !11745
2026-02-27 08:28:52 -05:00
Brad King
c1d58d3f3d Experimental: Restore import std gate
Several problems with this feature came up while testing 4.3.0-rc1.
These include both broken stdlib distributions and regressions in our
implementation of the feature since CMake 4.2.

Revert commit 70c1f0f43d (Experimental: Remove import std experimental
gate, 2026-02-04, v4.3.0-rc1~61^2) except for its incidental fixes.

Remove the 4.3 release notes related to `import std`.

Rotate the experimental gate's UUID.

Issue: #27426
Issue: #27597
Issue: #27626
Issue: #27635
2026-02-26 17:19:19 -05:00
Peter Kokot
45296cde2d Help: Transform CMAKE_SYSTEM_NAME tables into lists
Changes:
- Added some initial operating system family categories (Apple, UNIX,
  Windows).
- Used list instead of table. Unlike the tables, lists provide
  documenting additional info and CMake versions.
- Added CMake versions to most values where they were introduced or
  could be determined from the Git log.
- Additionally added the OHOS value to the list (introduced via #25987)
- Emscripten name was used by toolchain files also before CMake 4.2 but
  documented with this version.
2026-02-25 15:51:20 -05:00
Brad King
8705b0fa47 Merge topic 'patch-WindowsKernelModeDriver'
907f25fc64 CMAKE_SYSTEM_NAME: Mention WindowsKernelModeDriver

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11728
2026-02-24 14:25:07 -05:00
Brad King
fc34216180 Merge topic 'tweak-doc'
8b40c3642a Help: Tweak CMAKE_INSTALL_EXPORTS_AS_PACKAGE_INFO

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11727
2026-02-24 14:22:07 -05:00
Peter Kokot
907f25fc64 CMAKE_SYSTEM_NAME: Mention WindowsKernelModeDriver
This value can be used as of CMake 4.1 without experimental gate.
2026-02-24 18:39:37 +01:00
Matthew Woehlke
8b40c3642a Help: Tweak CMAKE_INSTALL_EXPORTS_AS_PACKAGE_INFO
The format example for CMAKE_INSTALL_EXPORTS_AS_PACKAGE_INFO is quite
long and, in its prior state, was likely to force a line wrap before it,
which could lead to non-optimal spacing of the preceding line. As there
is no easy way to break in the middle of the example, instead break it
out into a separate element.
2026-02-24 12:25:24 -05:00
Peter Kokot
60b8e6d33f CMAKE_SYSTEM_NAME: Mention HP-UX as discontinued system 2026-02-23 19:05:18 +01:00
Brad King
84aff9588f Merge topic 'remove-cps-experimental-gate'
f5c515cbf2 CPS: Remove experimental gate (mostly)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11683
2026-02-13 09:51:24 -05:00
Matthew Woehlke
f5c515cbf2 CPS: Remove experimental gate (mostly)
Remove basic CPS import and export from 'experimental' status. Update
documentation and tests accordingly.

Note that mapped exports (CMAKE_EXPERIMENTAL_MAPPED_PACKAGE_INFO) are
still experimental.
2026-02-11 16:10:29 -05:00
Brad King
0aa7e258d4 Merge topic 'doc-ctest-link'
01a47a790b Help: Link `CTEST_*` variables to dashboard client
12a0ebe96a Help/CTest: Improve formatting and grammar

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11677
2026-02-11 12:05:29 -05:00