Commit Graph

1940 Commits

Author SHA1 Message Date
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
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
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
Kyle Edwards
8cf21478ac math(): Add INCREMENT and DECREMENT modes 2026-07-15 11:40:07 -04:00
Arha Gatram
77156c92eb ALIAS: Add support for install and export commands
The install({TARGETS, EXPORT}) versions of the command now accept ALIAS
targets. The behavior is identical to what would happen if the name of
the target that the ALIAS references were put instead. The
export(TARGETS) command also has the same support and behavior for ALIAS
targets now.

Closes: #20979
2026-07-10 17:01:49 -07:00
Robert Maynard
b464920acc string(STRIP): Document that it removes newlines 2026-07-10 14:34:10 -04:00
Tom Osika
45623dd5f6 cmake_language: Add PRINT_TARGETS operation
Print CMake targets in human-readable form for debugging.

Issue: #27513
2026-07-09 16:02:12 -04:00
Brad King
0d9a4242e4 Merge topic 'alias-transparency'
17094eb572 ALIAS: Add test for generator expressions with ALIAS targets
5f8cc64695 ALIAS: Add support for add_dependencies for ALIAS targets
79e421b053 ALIAS: Add support for target_* commands
3b327695aa ALIASED_TARGET: Make property read-only
a121419908 ALIAS: Add support for set_property and set_target_properties commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12207
2026-07-09 10:06:32 -04:00
Arha Gatram
5f8cc64695 ALIAS: Add support for add_dependencies for ALIAS targets
The add_dependencies command currently accepts ALIAS targets for
<target-dependencies> which resolve to the referenced target. This further
relaxes the command to accept an ALIAS <target> where the command will
add the dependencies to the target which the alias references.
2026-07-08 11:51:51 -04:00
Arha Gatram
79e421b053 ALIAS: Add support for target_* commands
Now that set_property and set_target_properties support ALIAS targets,
we need to extend support to all the target_* type commands that modify
target properties.

Relaxes target_compile_definitions, target_compile_features,
target_compile_options, target_include_directories,
target_link_directories, target_link_libraries, target_link_options,
target_precompile_headers, and target_sources to now accept ALIAS
targets. These commands set properties on the target which the alias
references.
2026-07-08 11:51:50 -04:00
Arha Gatram
a121419908 ALIAS: Add support for set_property and set_target_properties commands
Currently, getting properties from an ALIAS target retrieves the property
from the target which the alias references while setting properties results
in an error. This relaxes set_property and set_target_properties to
accept ALIAS targets and act on the referenced target, mirroring the get
behavior.

An error is raised when setting ALIAS_GLOBAL or ALIASED_TARGET on an ALIAS
target.

Closes: #19445
2026-07-07 07:32:27 -07:00
Martin Duffy
e11b5827c3 ctest: Add --out-of-date option for running out of date tests
Add an --out-of-date option to ctest which runs only those tests with
recorded build dependencies whose timestamps are newer than the timestamp
at which the test last finished.

Fixes: #27614
2026-06-30 11:31:35 -04:00
Brad King
4933a2de10 Merge topic 'testprep-makefile-generators'
503bdb9777 Makefile: Generate test_prep targets for CMAKE_TEST_BUILD_DEPENDS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12214
2026-06-29 11:59:57 -04:00
Brad King
cdcc758ff5 Merge topic 'SOURCE_GROUP-property'
faeeac60e8 Add SOURCE_GROUP properties for file set and source file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12215
2026-06-25 11:25:08 -04:00
Gleb Popov
144021a43b file(GET_RUNTIME_DEPENDENCIES): Implement command for FreeBSD
Closes: #25305
2026-06-24 18:49:51 +03: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
Marc Chevrier
faeeac60e8 Add SOURCE_GROUP properties for file set and source file
Fixes: #27627
2026-06-24 16:01:23 +02:00
Brad King
23c5b40924 Merge topic 'fastbuild-test-deps'
2d417b9371 FASTBuild: Generate test_prep/ targets for test build dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12183
2026-06-24 09:54:39 -04:00
Martin Duffy
2d417b9371 FASTBuild: Generate test_prep/ targets for test build dependencies
Issue: #27879
2026-06-23 12:20:49 -04:00
Marc Chevrier
6043014d1d source_group(): Add file set support 2026-06-23 14:55:26 +02:00
Brad King
0060cb72e8 Merge topic 'function-argnc'
82c9d33e96 function: Set variable ARGNC
d14d0b0b23 function: Change arguments documentation to a definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12173
2026-06-18 11:14:48 -04:00
Brad King
edb85664e2 Merge topic 'file-archive-create-patterns-exclude'
9800bd2098 file(ARCHIVE_CREATE): Add PATTERNS_EXCLUDE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12179
2026-06-18 11:13:03 -04:00
Brad King
fcc9b7779b Merge topic 'spdx_license'
b533f229b8 cmSbom: Generate SPDX data denoting project licenses

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12133
2026-06-18 11:11:29 -04:00
Brad King
21769c177b Merge topic 'if-diagnostic'
597c573d7d if: Add `DIAGNOSTIC <category>` condition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12181
2026-06-17 08:54:50 -04:00
Matthew Woehlke
597c573d7d if: Add DIAGNOSTIC <category> condition
Add an existence check to the `if` command for diagnostic categories,
mirroring the check for policies. Aside from being desirable for
consistency's sake, this will make it easier for users to write logic to
manipulate diagnostics from newer versions of CMake that don't exist
today.
2026-06-16 15:14:13 -04:00
Daksh Mamodiya
9800bd2098 file(ARCHIVE_CREATE): Add PATTERNS_EXCLUDE option
Exclude files and directories matching the given patterns while creating
an archive, using libarchive's matcher for parity with file(ARCHIVE_EXTRACT).

Fixes: #27877.
2026-06-16 15:33:06 +02:00
Daniel Tierney
b533f229b8 cmSbom: Generate SPDX data denoting project licenses 2026-06-15 14:40:26 -04:00
Arha Gatram
82c9d33e96 function: Set variable ARGNC 2026-06-15 10:54:48 -07:00
Arha Gatram
d14d0b0b23 function: Change arguments documentation to a definition list 2026-06-15 10:54:48 -07:00
Brad King
efe56769ba Merge topic 'file-curl-errors'
1f32d51dbb Help/file: Reference curl documentation for error codes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12164
2026-06-12 09:37:51 -04:00
Brad King
debf2cc365 Merge topic 'file-archive-extract-extend'
531f3b568c file(ARCHIVE_EXTRACT): Add PATTERNS_EXCLUDE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !12163
2026-06-12 09:28:58 -04:00
Tyler Yankee
1f32d51dbb Help/file: Reference curl documentation for error codes
Fixes: #27866
2026-06-11 13:47:24 -04:00
Daksh Mamodiya
531f3b568c file(ARCHIVE_EXTRACT): Add PATTERNS_EXCLUDE option
Omit archive entries matching the given patterns when extracting or
listing. May be combined with PATTERNS; on overlap the exclusion
takes precedence.

Fixes: #27837
2026-06-11 02:04:36 +02:00
Martin Duffy
0480222ff4 instrumentation: Add compileTrace option
Adds support for optionally saving and reporting trace files generated by
Clang's `-ftime-trace` option.
2026-06-10 15:19:41 -04:00
Brad King
1027dbd3a0 Merge topic 'instrumentation-stderr-stdout'
8e2aecbe42 instrumentation: Increase data version to 1.1
1a85245496 instrumentation: Optionally Record Command Output
6674be6d26 RunCMake: Allow error output suppression from run_cmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12031
2026-06-05 10:52:16 -04:00
Brad King
059170f19c Merge topic 'instrumentation-stderr-stdout' into release-4.4
8e2aecbe42 instrumentation: Increase data version to 1.1
1a85245496 instrumentation: Optionally Record Command Output
6674be6d26 RunCMake: Allow error output suppression from run_cmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12031
2026-06-05 10:51:52 -04:00
Brad King
42ce0813e5 Merge topic 'doc-message-log-level'
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:02 -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
880290c696 Help: Update Sphinx versionadded directives for 4.4 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v4.3.0 --overwrite
2026-06-04 11:46:51 -04:00
Martin Duffy
8e2aecbe42 instrumentation: Increase data version to 1.1 2026-06-04 10:42:04 -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
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
Brad King
3b85f214d2 Merge topic 'instrumentation-data-version-minor'
f5a0f6478e Merge branch 'backport-instrumentation-data-version-minor' into instrumentation-data-version-minor
dcf146c34d instrumentation: Revise Data Version format
df36317176 instrumentation: Revise Data Version format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12117
2026-06-03 09:51:48 -04:00
Brad King
bdad2cbd97 Merge topic 'parse-arguments-argn'
97c36916d9 cmake_parse_arguments: Add PARSE_ARGN mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12131
2026-06-02 09:26:04 -04:00
Brad King
4bcb0a1dfa Merge topic 'fix-cmp0211-doc'
228795753f FILE_SET: Fix CMP0211-related documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12119
2026-06-02 09:19:40 -04:00
Brad King
f4c858d328 Merge topic 'multi_export_sbom'
2900aa2911 SBOM: Update experimental UUID
273fc4cc49 SBOM: Support multi export set SBOMs
9669829573 Install: Refactor ResolveTargetsInGeneratorExpression
7c31cbf9ae SBOM: Handle PACKAGE_URL argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12080
2026-06-02 09:15:40 -04:00
Martin Duffy
dcf146c34d instrumentation: Revise Data Version format
Give data version the new format <major>.<minor>, so that
the version can be incremented with the introduction of new
features without bumping the major version.

Add support for loading instrumentation JSON queries of unknown
data versions without error.

Issue: #27833
2026-06-02 08:55:20 -04:00
Arha Gatram
97c36916d9 cmake_parse_arguments: Add PARSE_ARGN mode
Introduce a mode similar to `PARSE_ARGV` that avoids needing
to specify the number of normal function arguments.

Closes: #25376
2026-06-01 18:06:25 -04:00