Commit Graph

1926 Commits

Author SHA1 Message Date
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
Tom Osika
273fc4cc49 SBOM: Support multi export set SBOMs 2026-06-01 12:27:13 -04:00
Zack Galbreath
7dc39e7221 ctest: prioritize presets over existing DartConfiguration.tcl commands
CMake writes ConfigureCommand and MakeCommand entries into
DartConfiguration.tcl when configuring a project that uses the CTest module.

These values prevented users from being able to use configure/build presets
in dashboard client mode from a pre-configured build directory.

This commit updates ctest_configure() and ctest_build() to ignore
CTEST_CONFIGURE_COMMAND / CTEST_BUILD_COMMAND when a preset is specified.
This allows the requested preset to be honored.
2026-05-29 11:40:47 -04:00
Matthew Woehlke
228795753f FILE_SET: Fix CMP0211-related documentation
Commit 4f120beea9 (FILE_SET: relax file uniqueness for HEADERS type,
2026-05-10) relaxed the restriction on file uniqueness in file sets, but
did not correctly update all instances of the documentation. Change the
wording to be a bit clearer and update all instances.
2026-05-28 16:53:01 -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
ec2da34f39 Merge topic 'docs-empty-if'
2bc862bc76 Help: Document if() behavior with empty condition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12108
2026-05-27 11:42:48 -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
Arha Gatram
2bc862bc76 Help: Document if() behavior with empty condition
Closes: #26527
2026-05-26 19:50:17 -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
0d2e9ce13c Merge topic 'instrumentation-data-version-doc'
1d0f587062 instrumentation: Clarify API and Data version distinction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12091
2026-05-21 09:45:18 -04:00
Martin Duffy
1d0f587062 instrumentation: Clarify API and Data version distinction
The instrumentation docs were unclear about the difference between API
and Data version, with the hierarchy of the table of contents being
particularly misleading.

Rework `cmake-instrumentation` manual and `cmake_instrumentation` command
documentation to be more clear.
2026-05-20 15:20:09 -04:00
Brad King
9d94a2abe6 Merge branch 'backport-cps-fix-default-dest' into cps-fix-default-dest 2026-05-19 15:26:46 -04:00
Matthew Woehlke
ed6e9abf98 CPS, SBOM: Fix default output destination
- Change default CPS install path on Windows from `cps` to `cps/<name>`,
per community recommendation that only paths containing the package name
should be considered as "officially" supported search locations (see
https://github.com/cps-org/cps/issues/79#issuecomment-2831102822).

- Change `export` to write to a subdirectory that allows the build
tree to be used as a search root.

- Change SBOM destinations to be consistent with the preceding.

Issue: #27785
2026-05-19 13:31:56 -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