Commit Graph

37768 Commits

Author SHA1 Message Date
Brad King
24c7c13cc6 Source: Fix typos 2025-07-24 10:39:21 -04:00
Brad King
e3f57a60ba Merge topic 'add-subparsers'
aaeffdfe6b cmArgumentParser: Refactor to allow for nested parsers
18f818f556 cmArgumentParser: Move parser state into dedicated struct

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10963
2025-07-24 09:37:23 -04:00
Brad King
52fce8d4fb Merge topic 'target-origin'
cc42f1047b cmTarget: Add origin property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vito Gamberini <vito.gamberini@kitware.com>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !10964
2025-07-24 09:31:01 -04:00
Kitware Robot
2d30c49cb9 CMake Nightly Date Stamp 2025-07-24 00:09:03 -04:00
Brad King
671b52fc5d Merge topic 'pchreuse-refactor'
11ee18b758 ci: extend msvc_v71_nmake `RunCMake.PrecompileHeaders` test timeout
1c91fadbe8 Tests/RunCMake/PrecompileHeaders: support extended timeout
42f2867b3b pchreuse: defer dependency addition until generation time
f9bc615d9a pchreuse: ban PCH reuse from targets which disable PCH
f78f592b78 pchreuse: defer target existence enforcement to generation time
3ef773490d pchreuse: defer PCH consistency checks to generation time
1d701491a2 pchreuse: always ask the PCH reuse target for PDB information
6e7da8aa95 cmGeneratorTarget: factor out reuse target computation
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: alcroito <alexandru.croitor@qt.io>
Acked-by: Vincent X <gulackeg@gmail.com>
Merge-request: !10887
2025-07-23 12:07:07 -04:00
Brad King
dbd12c8bff Merge topic 'instrumentation-windows'
f7756853c5 instrumentation: Exclude (pre|post)Build hooks with MSYS Makefiles
455944508e instrumentation: Remove ninja-specific references
7dbe092d77 instrumentation: Support preBuild and postBuild hooks on Windows
6d6c8303f9 Tests: Teach RunCMake.Instrumentation to tolerate make tool output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10932
2025-07-23 12:03:11 -04:00
Taylor Sasser
aaeffdfe6b cmArgumentParser: Refactor to allow for nested parsers 2025-07-23 09:42:05 -04:00
Kitware Robot
6754d2f9b8 CMake Nightly Date Stamp 2025-07-23 00:04:56 -04:00
Taylor Sasser
18f818f556 cmArgumentParser: Move parser state into dedicated struct 2025-07-22 14:15:25 -04:00
Ben Boeckel
42f2867b3b pchreuse: defer dependency addition until generation time
Note that this does lose the backtrace information. It also, however,
makes `PRECOMPILE_HEADERS_REUSE_FROM` a non-magic property now.
Previously, appending to the property would miss all of its behaviors
(or leave existing setup in-place which is no longer relevant
post-append). Rather than making a policy to block appending, just defer
all logic to generation time.
2025-07-22 12:42:58 -04:00
Ben Boeckel
f9bc615d9a pchreuse: ban PCH reuse from targets which disable PCH 2025-07-22 12:42:57 -04:00
Ben Boeckel
f78f592b78 pchreuse: defer target existence enforcement to generation time
Now that generation can work with any way the state gets to the way it
is, just do the target enforcement at generation time. This allows PCH
reuse targets to be declared before or after targets which use them.

Also update `cmLocalGenerator` to use the methods now that they reliably
provide values rather than parallel construction.
2025-07-22 12:42:57 -04:00
Ben Boeckel
3ef773490d pchreuse: defer PCH consistency checks to generation time
There's no reason that during-configure inconsistencies should block
generation. It can be detected at that point instead.
2025-07-22 12:42:57 -04:00
Ben Boeckel
1d701491a2 pchreuse: always ask the PCH reuse target for PDB information
The property settings set things up once, but nothing ensures that
post-reuse hookup that any property changes propagate. Instead, when
computing PDB information, if PCH reuse is enabled, just always use its
values.

Also drop enforcement at generate time of property value consistency as
it is now ignored when PCH reuse is in effect.

Additionally, if a target is PCH-reused, generate a PDB output directory
for it.

The `PchReuseFromIgnoreOwnProps` test failed previously because the
post-reuse link update of the consuming `PDB` properties are no longer
considered. The `PchReuseFromUseUpdatedProps` failed because the
post-reuse link did not update the copy of the properties added to
consuming reuse target properties.
2025-07-22 12:42:57 -04:00
Ben Boeckel
6e7da8aa95 cmGeneratorTarget: factor out reuse target computation 2025-07-22 12:42:57 -04:00
Ben Boeckel
99bdf2ae16 cmLocalGenerator: add PDB copying dependency on its script 2025-07-22 12:42:57 -04:00
Ben Boeckel
d3849f9de1 cmLocalGenerator: add a useful comment for the PDB copying command 2025-07-22 12:42:57 -04:00
Ben Boeckel
cb46c4a918 cmLocalGenerator: fix quoting in generated script 2025-07-22 12:42:57 -04:00
Brad King
f2727c6e05 Merge topic 'ninja-per-source-job-pool'
3a9d56d2c7 Ninja: Add support for per-source JOB_POOL_COMPILE property
44bf494fe6 Help: Global SPLIT_JOBS: reformat usages into a list.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10936
2025-07-22 12:07:38 -04:00
Matthew Woehlke
cc42f1047b cmTarget: Add origin property
Add the concept of "origin" to cmTarget. For now, only CPS targets get a
unique origin, but this might be expanded in the future. This will allow
us to implement different behaviors based on a target's origin.

In particular, this has been requested as a means of addressing #26998
and #27022.
2025-07-22 11:20:10 -04:00
Tyler Yankee
f7756853c5 instrumentation: Exclude (pre|post)Build hooks with MSYS Makefiles
The implementation of (pre|post)Build hooks rely on a direct parent-
child relationship between the build system process and `ctest
--start-instrumentation`. MSYS2's `make.exe` uses the msys-runtime POSIX
compatibility layer which disrupts this relationship.
2025-07-22 11:06:41 -04:00
Tyler Yankee
455944508e instrumentation: Remove ninja-specific references
Amend commit 314440c320 (instrumentation: Run preBuild and postBuild
hooks before and after make, 2025-02-05) to make comments and variables
names in `cmInstrumentation` agnostic to the build system being used.
2025-07-22 10:51:15 -04:00
Tyler Yankee
7dbe092d77 instrumentation: Support preBuild and postBuild hooks on Windows
* Use `uv_disable_stdio_inheritance` to resolve the deadlock between the
parent build system process and `ctest
--wait-and-collect-instrumentation` on Windows.
* Remove Windows gating from preBuild and postBuild indexing and update
tests and documentation accordingly.

Fixes: #26668
2025-07-22 10:51:03 -04:00
Kitware Robot
f65949b96e CMake Nightly Date Stamp 2025-07-22 00:04:54 -04:00
Brad King
5e26f8d3a7 Merge topic 'instrumentation-ctest-interface'
21ac285cd8 Experimental: Update the Instrumentation UUID
9dec460c8c instrumentation: Store CDash settings in query files
afa94bae1e instrumentation: Rename queries field to options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10934
2025-07-21 10:13:32 -04:00
Brad King
f8dcf102d9 Merge topic 'find-package-unwind'
f61768107e find_package: Implement UNWIND_INCLUDE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10943
2025-07-21 10:09:00 -04:00
Kitware Robot
b419a1de15 CMake Nightly Date Stamp 2025-07-21 00:07:28 -04:00
Kitware Robot
83e06f09ab CMake Nightly Date Stamp 2025-07-20 00:11:46 -04:00
Kitware Robot
eb56394c9d CMake Nightly Date Stamp 2025-07-19 00:04:55 -04:00
Kitware Robot
b52ea487d7 CMake Nightly Date Stamp 2025-07-18 00:04:30 -04:00
Kitware Robot
58fc19e5c4 CMake Nightly Date Stamp 2025-07-17 00:04:37 -04:00
Bastien Montagne
3a9d56d2c7 Ninja: Add support for per-source JOB_POOL_COMPILE property
This commit allows to override a global or target-wide 'job pool'
property on a per-source basis.

It modifies the Ninja generator to first look into the source's
properties, and only use the target properties as a fallback.

The new `source` parameter to
`cmNinjaTargetGenerator::addPoolNinjaVariable` may be null, e.g. when
the function is called in context where there is no source (e.g. a
linking task).

Closes: #23994
2025-07-16 21:16:24 +02:00
Brad King
369c36503d Merge topic 'export-use-subcommand'
998495cb49 cmExportCommand: Port to cmSubcommandTable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vito Gamberini <vito.gamberini@kitware.com>
Merge-request: !10947
2025-07-16 13:49:00 -04:00
Taylor Sasser
998495cb49 cmExportCommand: Port to cmSubcommandTable
Previously, the `cmExportCommand` parser did not use `cmSubcommandTable`
to distinguish between its `TARGETS`, `EXPORT`, `SETUP`, and `PACKAGE`
modes.  This created a maintenance burden when updating or adding
functionality.

Refactor the parser to use a subcommand for each keyword.  This new
structure mirrors the design of `cmInstallCommand` and simplifies future
development.
2025-07-16 11:33:48 -04:00
Brad King
1f9de0c82d Merge topic 'cmake-parent-fix'
41aea12941 Do not define CMAKE_PARENT_LIST_FILE in CMakeLists.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10930
2025-07-16 11:27:00 -04:00
Kitware Robot
47df2a940a CMake Nightly Date Stamp 2025-07-16 00:04:38 -04:00
Benjamin Buch
41aea12941 Do not define CMAKE_PARENT_LIST_FILE in CMakeLists.txt
Add policy `CMP0198` for compatibility.

Issue: #25026
2025-07-15 11:51:45 -04:00
Brad King
f19fa50b48 Merge topic 'string-json-better-error'
35f002e293 string(JSON): Include invalid JSON in parse error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10944
2025-07-15 10:56:02 -04:00
Brad King
a584d962d1 Merge topic 'code-check-ninja-path-fix'
baa74ed677 clang-tidy: Use cleaner path to export-fixes file with Ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Eduard Voronkin <edward.voronkin@gmail.com>
Merge-request: !10946
2025-07-15 10:50:44 -04:00
Brad King
0b1dace035 Merge topic 'codemodel-version-directory-target-objects'
4315076f2e fileapi: Add codemodelVersion fields to target and directory objects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10928
2025-07-15 10:47:42 -04:00
Vito Gamberini
baa74ed677 clang-tidy: Use cleaner path to export-fixes file with Ninja
The clang-tidy "export-fixes" flag was using unconverted Ninja paths due
to a flipped boolean check from commit 993dde925f (TargetGenerator:
Factor out generation of code check rules, 2023-05-12,
v3.27.0-rc1~84^2~2).
2025-07-15 10:46:10 -04:00
Martin Duffy
21ac285cd8 Experimental: Update the Instrumentation UUID
Update experimental UUID for instrumentation after commit afa94bae1e
(instrumentation: Rename queries field to options, 2025-07-08) broke compatibility
for old queries.
2025-07-15 08:38:44 -04:00
Kitware Robot
2c3f83a164 CMake Nightly Date Stamp 2025-07-15 00:04:26 -04:00
Martin Duffy
9dec460c8c instrumentation: Store CDash settings in query files
Adds new `cdashSubmit` and `cdashVerbose` options to allow enabling
instrumentation in CDash submissions using query files or the
`cmake_instrumentation` command.

Fixes: #26783, #26727
2025-07-14 15:44:52 -04:00
Brad King
e82da297d4 Merge topic 'file-api-version-int-vars'
892fa0bb88 fileapi: Use unsigned int consistently for version numbers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10945
2025-07-14 10:13:58 -04:00
Brad King
263c76a0cd Merge topic 'file-GLOB-CONFIGURE_DEPENDS-verbose'
9f28c02056 file(GLOB): Make CONFIGURE_DEPENDS mismatch more verbose

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10939
2025-07-14 09:35:09 -04:00
Brad King
8815ed41ab Merge topic 'cpack-wix-long-paths'
f0f1d6e147 CPack/WiX: Encode long paths with UNC prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10929
2025-07-14 09:31:52 -04:00
Kitware Robot
07f4179b81 CMake Nightly Date Stamp 2025-07-14 00:04:40 -04:00
Vito Gamberini
f61768107e find_package: Implement UNWIND_INCLUDE
This implements a limited exception mechanism for find_package() via
the UNWIND_INCLUDE keyword.

When package discovery via find_package(UNWIND_INCLUDE) fails the
StateSnapshot is updated to an UNWINDING state. In this state further
calls to find_package() and include() are forbidden. While in the
UNWINDING state, the include() command immediately calls
SetReturnInvoked() whenever it is reached.

The UNWINDING state is reset when a parent call to find_package() is
reached.

Fixes: #26897
2025-07-13 16:08:19 -04:00
Craig Scott
4315076f2e fileapi: Add codemodelVersion fields to target and directory objects
This will allow JSON schemas for these two types of files to describe the
version-specific content without requiring any outside information.

Fixes: #27031
2025-07-13 14:59:03 +10:00