Commit Graph
9737 Commits
Author SHA1 Message Date
Brad King e98e59cc82 Merge topic 'FindPython-SOSABI_PLATFORM'
91e227939c FindPython: Add Python_SOSABI_PLATFORM variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12360
2026-08-01 07:27:55 -04:00
Marc Chevrier 91e227939c FindPython: Add Python_SOSABI_PLATFORM variable
This variable gives the SABI module extension which include the
platform triplet.

Fixes: #27997
2026-07-31 16:41:01 +02:00
Brad King 8e7b683c67 Merge branch 'release-4.4' 2026-07-31 09:30:03 -04:00
Brad King c162d6852d CMake 4.4.2 2026-07-31 09:01:06 -04:00
Brad King 6563ddeea3 Merge topic 'better-tty-preset-macro-refs'
c00106b20f Help: Improve formatting of presets manual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12340
2026-07-30 11:36:00 -04:00
Brad King 8a947d73d5 Merge topic 'warn-non-target-directives'
00959286b9 Diagnostics: Warn about non-target directives

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12172
2026-07-29 10:34:27 -04:00
Matthew Woehlke c00106b20f Help: Improve formatting of presets manual
Tweak how we reference preset macros so that references also carry
'literal' markup. While this provides a modest improvement to HTML
rendered help, it primarily serves to apply 'literal' formatting
consistently for TTY output (`cmake --help-presets`).
2026-07-28 17:01:59 -04:00
Matthew Woehlke 00959286b9 Diagnostics: Warn about non-target directives
Introduce `CMD_STRICT` to act as a parent for warnings about allowed but
disrecommended usage. Introduce a warning that discourages use of
non-target directives (which modify the build environment for the entire
[sub]tree). Add notes to the official documentation recommending use of
target-specific alternatives. This has been accepted wisdom for quite
some time, but only some of the affected commands made any mention of
this in the documentation.
2026-07-28 11:38:20 -04:00
Brad King b5efecc945 Merge branch 'release-4.4' 2026-07-28 10:59:30 -04:00
Brad King d1cffecacd CMake 4.4.1 2026-07-28 10:26:50 -04:00
Brad King 4b88240b64 Merge topic 'ctest_test-label-and'
257865e1d4 CTest: Make ctest_test() label filters multi-value (AND)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12321
2026-07-28 09:50:30 -04:00
Brad King e7b32d14b9 Merge topic 'doc-FILE_SET-buildsystem'
c707fde0f2 Help: Move general FILE_SET info to cmake-buildsystem(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12309
2026-07-28 09:46:09 -04:00
Brad King 1de00b708e Merge topic 'add_custom_command-comment-doc-clarify'
9d9733a7f5 Help: Clarify add_custom_command COMMENT display timing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12334
2026-07-28 09:44:37 -04:00
Brad King 70f568b17b Merge topic 'FindPython-add-pydebug-ABI-support-on-Windows'
84cb7e2629 FindPython: Add support for pydebug ABI flag on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12325
2026-07-28 09:35:25 -04:00
Brad King 32d437aa49 Merge topic 'FindPython-add-pydebug-ABI-support-on-Windows' into release-4.4
84cb7e2629 FindPython: Add support for pydebug ABI flag on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12325
2026-07-28 09:35:23 -04:00
Daksh Mamodiya 9d9733a7f5 Help: Clarify add_custom_command COMMENT display timing
The "before the commands are executed" wording predated the Ninja
generator; the native build tool controls when and how it is shown.

Fixes: #27991
2026-07-27 17:42:22 +02:00
Brad King 07368fab0c Merge topic 'test-include-files-genex'
63316be823 TEST_INCLUDE_FILES: Evaluate generator expressions in include paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12313
2026-07-27 10:12:30 -04:00
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
Tyler Yankee c707fde0f2 Help: Move general FILE_SET info to cmake-buildsystem(7)
File sets have evolved to be more ubiquitous throughout a CMake build,
outside the scope of simply the target_sources command. Move general
information to the `cmake-buildsystem(7)` manual and keep only
reference information specific to the syntax of target_sources in its
command page. Sprinkle some more cross-references to the new location.

Fixes: #27900

Suggested-By: Marc Chevrier <marc.chevrier@gmail.com>
2026-07-27 09:01:37 -04:00
Marc Chevrier 84cb7e2629 FindPython: Add support for pydebug ABI flag on Windows
Fixes: #27969
2026-07-26 17:10:25 +02:00
Daksh Mamodiya 257865e1d4 CTest: Make ctest_test() label filters multi-value (AND)
The ctest(1) command line allows repeating -L/-LE to form an AND
filter over test labels, but the ctest_test() and ctest_memcheck()
scripting commands accepted only a single INCLUDE_LABEL/EXCLUDE_LABEL
value, so a dashboard script could not express that filter.

The label-matching engine already stores the include/exclude
expressions as vectors and applies them with AND semantics; only the
command binding was single-value.  Change both keywords to multi-value
(NonEmpty<vector<string>>) and hand the collected list straight to the
engine.  ctest_memcheck() gains the same behavior for free, since it
inherits the option set.

Fixes : #27497
2026-07-24 21:27:58 +02:00
Brad King 96b3a4e6c7 Style: Replace some UTF-8 characters with ASCII equivalents 2026-07-24 09:55:14 -04:00
Daksh Mamodiya 63316be823 TEST_INCLUDE_FILES: Evaluate generator expressions in include paths
The TEST_INCLUDE_FILE(S) directory properties were written verbatim into
CTestTestfile.cmake, so a $<CONFIG>-parameterized include path could not
select a per-configuration script and failed at ctest time.

Evaluate generator expressions per include entry in
cmLocalGenerator::GenerateTestFiles():

* Entries without a generator expression are emitted unchanged.
* On single-config generators a genex entry is evaluated once and
  emitted as one unconditional include.
* On multi-config generators it is evaluated for every configuration;
  a config-independent result collapses to one unconditional include,
  otherwise each non-empty per-config result is guarded by a
  CTEST_CONFIGURATION_TYPE branch, mirroring add_test().  An entry that
  evaluates to empty adds no include.

Promote cmScriptGenerator::CreateConfigTest to a public static helper so
the include guards reuse the exact add_test() config-test encoding; the
instance overloads now delegate to it.  Evaluated results are quoted via
cmScriptGenerator::Quote, while plain entries keep their raw
serialization.

Fixes: #27941
2026-07-23 18:58:04 +02:00
Brad King 42da7a30a9 Merge topic 'ctest-dyn-rsrc-spec-rel-path'
4c2d06e69b CTest: Add support for relative paths in GENERATED_RESOURCE_SPEC_FILE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12265
2026-07-23 08:56:22 -04:00
Brad King f3fd32b96d Merge topic 'doc-cmake_language-print'
a09578ae84 Help/cmake_language: Fix PRINT_TARGETS signature rendering
f46a631f0c Help/cmake_language: Document print operation(s) last

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12311
2026-07-23 08:35:07 -04:00
Brad King 7eb1890244 Merge topic 'cps-executable-import'
207c132378 CPS: Support importing executables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12294
2026-07-23 08:32:38 -04:00
Tom Osika a09578ae84 Help/cmake_language: Fix PRINT_TARGETS signature rendering 2026-07-22 14:39:00 -04:00
Tom Osika f46a631f0c Help/cmake_language: Document print operation(s) last
Move documentation added by commit 45623dd5f6 (cmake_language: Add
PRINT_TARGETS operation, 2026-06-26) to the end of the signature list
to make room for more print signatures.

Issue: #27513
2026-07-22 14:38:41 -04:00
Arha Gatram 4c2d06e69b CTest: Add support for relative paths in GENERATED_RESOURCE_SPEC_FILE 2026-07-22 09:49:28 -07:00
Brad King 9c631586d2 Merge topic 'cuda-toolkit-namespace'
f2d5320d42 FindCUDAToolkit: Add CUDAToolkit:: namespace targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12290
2026-07-22 11:32:13 -04:00
Brad King fcd200ab3b Merge topic 'diagnose-deprecated-commands'
75161b34b6 bootstrap: Remove deprecated commands
664eb8412a cmake: Don't use deprecated commands to build
3745af331a Add deprecation diagnostics to deprecated commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12277
2026-07-22 11:27:01 -04:00
Brad King 5868009096 Merge topic 'ctest-windows-jobserver-client'
79331d5865 CTest: Add Windows job server client

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12297
2026-07-22 11:23:38 -04:00
Vito Gamberini 207c132378 CPS: Support importing executables
Fixes: #27964
2026-07-22 10:45:59 -04:00
Brad King 697df9a12a Merge topic 'vs-clangcl-modules'
027b962a81 VS: Avoid unsupported ScanSourceForModuleDependencies under ClangCl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vito Gamberini <vito.gamberini@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !12301
2026-07-22 09:55:45 -04:00
Brad King 8dd7eb41bb Merge topic 'vs-clangcl-modules' into release-4.4
027b962a81 VS: Avoid unsupported ScanSourceForModuleDependencies under ClangCl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vito Gamberini <vito.gamberini@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !12301
2026-07-22 09:55:42 -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
Brad King 5175aa4872 Merge topic 'doc-ide-compiler-selection' into release-4.4
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:29 -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
Tyler Yankee 027b962a81 VS: Avoid unsupported ScanSourceForModuleDependencies under ClangCl
As of commit ed48feeae8 (clang-cl: Add support for C++ modules,
2026-03-27, v4.4.0-rc1~428^2) CMake tries to support modules for
clang-cl, which can mostly be accomplished, except for the ClangCl VS
toolset, where the /scanDependencies flag is not yet supported.

Amend commit 3022f0363f (VS: set ScanSourceForModuleDependencies at
vcxproj level, 2024-04-27, v3.28.5~3^2) to only emit this setting when
scanning is supported by the toolchain.

Fixes: #27957
Issue: #27977
2026-07-21 17:02:29 -04:00
FeRD (Frank Dana) b3e1e07c67 Help: target_sources: Align descriptions with signatures
Recent changes to the `target_sources()` docs changed the `<items>`
placeholders to `<source>` or `<files>` (for `FILE_SET` commands),
but the documentation still used "items" frequently, and even
`<items>` once.

Change all mentions of "items" to use terms that match the
corresponding placeholders, for consistency.
2026-07-21 15:43:01 -04:00
FeRD (Frank Dana) 8df169ebe1 Help: target_sources: Align descriptions with signatures
Recent changes to the `target_sources()` docs changed the `<items>`
placeholders to `<source>` or `<files>` (for `FILE_SET` commands),
but the documentation still used "items" frequently, and even
`<items>` once.

Change all mentions of "items" to use terms that match the
corresponding placeholders, for consistency.
2026-07-21 15:42:13 -04:00
Arha Gatram f2d5320d42 FindCUDAToolkit: Add CUDAToolkit:: namespace targets
Changes target namespace to CUDAToolkit to match module name. Adds ALIAS
targets with the old CUDA:: namespace to maintain backwards
compatibility.

Issues: #27786
2026-07-20 15:59:26 -07:00
Daksh Mamodiya 79331d5865 CTest: Add Windows job server client
Use a named semaphore polled from the libuv event loop to share GNU Make
job slots on Windows. Cover token ordering, bounded draining, and
teardown, and document the new support.

Fixes: #27968
2026-07-20 16:40:11 +02:00
Brad King a6d2c60f73 Merge topic 'googletest_handle_newline_characters'
2c181bd60a GoogleTest: Drop newlines from test names
b464920acc string(STRIP): Document that it removes newlines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12262
2026-07-20 09:58:38 -04:00
Brad King f890d7a75f Merge topic 'math-increment-decrement'
8cf21478ac math(): Add INCREMENT and DECREMENT modes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !12280
2026-07-17 10:34:48 -04:00
Brad King 7991e0dc19 Merge topic 'alias-transparency-install'
77156c92eb ALIAS: Add support for install and export commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12260
2026-07-17 10:23:26 -04:00
Brad King a79eb9dcc4 Merge topic 'instrumentation-interrupt-ctest'
d5d2741414 Instrumentation: Write ctest snippet on interrupted test run

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12272
2026-07-17 10:21:51 -04:00
Kyle Edwards 8cf21478ac math(): Add INCREMENT and DECREMENT modes 2026-07-15 11:40:07 -04:00
Daksh Mamodiya d5d2741414 Instrumentation: Write ctest snippet on interrupted test run
Extend the interrupt-flush mechanism already used for cmakeBuild and
cmakeInstall to ctest, so that a user interrupt (e.g. Ctrl+C) still writes
the overall ctest instrumentation snippet, marked with interruptSignal,
before exiting.

On interrupt CTest stops scheduling further tests at every launch site,
skips the postCTest hook, forces a non-zero exit status, and preserves the
checkpoint file so that a later 'ctest -F' can resume the interrupted test
set.

Issue: #27859
2026-07-14 20:40:09 +02:00
Brad King 06942468dd Merge topic 'print_targets'
45623dd5f6 cmake_language: Add PRINT_TARGETS operation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12225
2026-07-14 09:23:12 -04:00