Commit Graph

37838 Commits

Author SHA1 Message Date
Kitware Robot ee45e7d426 CMake Nightly Date Stamp 2025-08-04 00:04:45 -04:00
Kitware Robot 55dc83e3d7 CMake Nightly Date Stamp 2025-08-03 00:05:22 -04:00
Brad King 383406fc18 Merge topic 'pass-trivial-by-value'
b1fdab3cc1 source: Pass small and trivially copyable types by value
7829ea76ad source: Pass cmFileTime by value
99c10afc26 source: Pass trivial dap::*Event by value
0bcb8d6e3c source: Pass cmFileAPI::Object by value
964e992ec5 source: Pass cmCTestResourceAllocator::Resource by value
ee1c32b6d7 source: Pass cmBuildOptions by value
fa0e5906ff source: Pass cmStringRange by value
0c4040057a source: Pass cm::string_view by value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10948
2025-08-02 06:23:48 -04:00
Kitware Robot 3a9c61ed5f CMake Nightly Date Stamp 2025-08-02 00:05:08 -04:00
Brad King d1be722330 Merge topic 'issue-24923-new-cli-tools'
8797912e4d cmake -E: Add copy_if_newer and copy_directory_if_newer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10957
2025-08-01 11:13:56 -04:00
Daniel Pfeifer b1fdab3cc1 source: Pass small and trivially copyable types by value 2025-08-01 09:56:00 -04:00
Daniel Pfeifer 7829ea76ad source: Pass cmFileTime by value 2025-08-01 09:56:00 -04:00
Daniel Pfeifer 99c10afc26 source: Pass trivial dap::*Event by value 2025-08-01 09:55:59 -04:00
Daniel Pfeifer 0bcb8d6e3c source: Pass cmFileAPI::Object by value 2025-08-01 09:55:50 -04:00
Kitware Robot 025794aab1 CMake Nightly Date Stamp 2025-08-01 00:05:06 -04:00
Brad King 30793dda4e Merge topic 'mutable-find-package-stack-alt'
b3873b8272 cmFindPackageStack: Allow controlled mutation
f2bdc2176f cmStack: New, mutable stack class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10978
2025-07-31 10:54:22 -04:00
Brad King 04abde5ee3 Merge topic 'fix-config-genex'
8ac826a5f2 GenEx: Fix evaluation of $<CONFIG> on imported targets
9b36e49ad9 cmGeneratorExpressionNode: Remove dead code from ConfigurationTestNode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10940
2025-07-31 10:52:56 -04:00
Benjamin Buch 8797912e4d cmake -E: Add copy_if_newer and copy_directory_if_newer
Fixes: #24923
2025-07-31 10:55:59 +02:00
Kitware Robot 0351e13a40 CMake Nightly Date Stamp 2025-07-31 00:04:39 -04:00
Matthew Woehlke 8ac826a5f2 GenEx: Fix evaluation of $<CONFIG> on imported targets
The historic implementation of `$<CONFIG>` had some errors that could
result in multiple configurations matching. First, it always considered
the configuration of the consuming target, even if a consumed imported
target selected a different configuration. Second, it matched the entire
list of `MAP_IMPORTED_CONFIG_<CONFIG>` configurations, even if none of
those were actually selected. The latter in particular is redundant at
best, as we also consider the selected configuration of an imported
target, which is the correct configuration to match for imported
targets. Refactor the implementation so that only one configuration is
considered.

Fixes: #23660
Issue: #27022
2025-07-30 15:12:03 -04:00
Matthew Woehlke 9b36e49ad9 cmGeneratorExpressionNode: Remove dead code from ConfigurationTestNode
Commit 910ada1a88 (Genex: $<CONFIG:> syntax of all entries checked,
2023-01-17) tweaked how ConfigurationTestNode::Evaluate validates its
arguments, which resulted in the removal of the body of an `if` but not
the `if` itself. Since the condition does not have side effects, this
resulted in superfluous leftover code. Remove this.
2025-07-30 15:11:38 -04:00
Daniel Pfeifer 964e992ec5 source: Pass cmCTestResourceAllocator::Resource by value 2025-07-30 11:55:34 -04:00
Daniel Pfeifer ee1c32b6d7 source: Pass cmBuildOptions by value 2025-07-30 11:55:34 -04:00
Daniel Pfeifer fa0e5906ff source: Pass cmStringRange by value 2025-07-30 11:55:34 -04:00
Daniel Pfeifer 0c4040057a source: Pass cm::string_view by value 2025-07-30 11:55:33 -04:00
Brad King 1c3300998f Merge topic 'short-object-names'
8180ecad9b autogen: support the `SHORT` intermediate dir strategy
f97d1bf7d8 Visual Studio: support shortened object filenames
a3a190c006 cmcmd: also forward rsp files in `.o` directories
3f33a5387a Makefiles: support shortened object filenames
b121adaa04 Makefiles: pass the target name to `cmake -E cmake_depends`
851e07fda3 Ninja: support short object directories
050f891d81 Tests: choose an explicit FULL strategy in tests expecting it
cce31527f8 Tests/ObjectLibrary: add shortened path tests
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10833
2025-07-30 11:36:21 -04:00
Matthew Woehlke b3873b8272 cmFindPackageStack: Allow controlled mutation
As mentioned in the previous commit, we would like to record additional
information in the find-package stack, but we don't have the information
at the point a stack entry is created. This necessitates making the
stack mutable. However, in order to restrict mutation, do not directly
expose the mutable value, and instead arrange for it to be accessible
only via cmFindPackageStackRAII (renamed and extracted from cmMakefile).
This ensures that mutation can only happen while the stack is being
built.
2025-07-30 11:01:14 -04:00
Brad King 63670ee246 Merge topic 'deb_uniform_compression'
57eed59f35 CPack/DEB: Use the same compression type for control tar

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10981
2025-07-30 10:31:37 -04:00
Brad King 188c2d2476 Merge topic 'export-dependencies-unwind'
92b403fc62 install(EXPORT): Use UNWIND_INCLUDE in exported find_dependency()
bba78d656e FindDependency: Split up macro to allow for no_return variant

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10968
2025-07-30 10:14:47 -04:00
Matthew Woehlke f2bdc2176f cmStack: New, mutable stack class
We would like to record additional information in the find-package
stack, but we don't have the information at the point a stack entry is
created. The most sane way to handle this appears to be making the stack
mutable, at least under specific circumstances. To facilitate this, we
need a mutable stack type.

Refactor cmConstStack into cmStack, with the ability to either allow or
forbid mutation of its data. Re-add cmConstStack as a type alias.

This doesn't yet allow mutating cmFindPackageStack, but it's a necessary
step toward being able to do so.
2025-07-30 10:11:36 -04:00
Kitware Robot 66bf4e95c9 CMake Nightly Date Stamp 2025-07-30 00:05:46 -04:00
kiwixz 57eed59f35 CPack/DEB: Use the same compression type for control tar
Uniform compression is the default since dpkg 1.19.0.
2025-07-29 20:32:48 +02:00
Ben Boeckel 8180ecad9b autogen: support the SHORT intermediate dir strategy 2025-07-29 09:44:03 -04:00
John Parent f97d1bf7d8 Visual Studio: support shortened object filenames 2025-07-29 09:44:03 -04:00
Ben Boeckel a3a190c006 cmcmd: also forward rsp files in .o directories 2025-07-29 09:44:03 -04:00
Brad King 318f90ff5f Merge topic 'revert-install-DIRECTORY-exclude-empty'
21e99dbf49 install(DIRECTORY): Revert "Add EXCLUDE_EMPTY_DIRECTORIES option"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10977
2025-07-29 09:40:54 -04:00
John Parent 3f33a5387a Makefiles: support shortened object filenames 2025-07-29 08:28:22 -04:00
Ben Boeckel b121adaa04 Makefiles: pass the target name to cmake -E cmake_depends
When a shortened directory is used, the name of the target is not
accessible just by the path. Pass it explicitly.
2025-07-29 08:06:30 -04:00
John Parent 851e07fda3 Ninja: support short object directories 2025-07-29 08:06:30 -04:00
John Parent 526a6f2a81 cmGeneratorTarget: shorten PCH filenames 2025-07-29 08:06:29 -04:00
John Parent 1feb801463 cmLocalGenerator: support shortening object filenames 2025-07-29 08:06:29 -04:00
John Parent 76f01de30e cmLocalGenerator: add a GetRelativeSourceFileName method
This will be used for short object path support.
2025-07-29 08:06:29 -04:00
John Parent 324907a60b cmGlobalGenerator: add methods for use when implementing short dir support 2025-07-29 08:06:28 -04:00
Kitware Robot d3e34186f6 CMake Nightly Date Stamp 2025-07-29 00:05:00 -04:00
Brad King 21e99dbf49 install(DIRECTORY): Revert "Add EXCLUDE_EMPTY_DIRECTORIES option"
Revert commit b70ef48b27 (install(DIRECTORY): Add
EXCLUDE_EMPTY_DIRECTORIES option, 2025-04-20, v4.1.0-rc1~212^2).
The implementation had at least two problems:

* It did not exclude the top-level directory if empty.
* It did not exclude non-empty directories whose contents are
  all filtered out.

Revert the feature pending a revised implementation.

Issue: #19189
Closes: #27092
2025-07-28 14:21:09 -04:00
John Parent e1041bd270 cmLocalCommonGenerator: factor out "long" directory calculation 2025-07-28 12:01:28 -04:00
Ben Boeckel c4bf198aed cmGeneratorTarget: add a query for whether to use short object names 2025-07-28 12:01:28 -04:00
Ben Boeckel 02b2153d84 cmGlobalGenerator: add a query to represent support for short object names 2025-07-28 12:01:28 -04:00
John Parent 392543384f cmake: support setting the intermediate dir strategy from the environment 2025-07-28 12:01:28 -04:00
John Parent c6763bb021 ctest: support a new --objects-dir argument
When shorter object directories are used, CTest needs to know where to
look for artifacts.
2025-07-28 12:01:28 -04:00
Ben Boeckel dcba9ed828 Makefiles: populate the TARGET_SUPPORT_DIR replacement variable 2025-07-28 12:01:27 -04:00
Ben Boeckel dfba904178 Ninja: populate the TARGET_SUPPORT_DIR replacement variable 2025-07-28 12:01:27 -04:00
Ben Boeckel d1393cc69e cmRulePlaceholderExpander: expand <TARGET_SUPPORT_DIR> placeholders 2025-07-28 12:01:27 -04:00
Ben Boeckel cf1a17861b cmLocalGenerator: add <CMAKE_{BINARY,SOURCE}_DIR> expanders 2025-07-28 12:01:27 -04:00
Brad King a69131cd88 Merge topic 'export-refactor'
078b96f927 cmExportCommand: Refactor export(EXPORT ... ) to use subparsers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10965
2025-07-28 11:08:24 -04:00