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`).
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.
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>
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
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
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
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
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
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.
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.
Changes target namespace to CUDAToolkit to match module name. Adds ALIAS
targets with the old CUDA:: namespace to maintain backwards
compatibility.
Issues: #27786
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
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