Commit Graph

64950 Commits

Author SHA1 Message Date
Brad King
63600a8ca6 Merge topic 'test-BuildDepends-no-rosetta' into release-3.29
6b8c99a1e3 Tests: Fix BuildDepends on macOS arm64 without rosetta

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9277
2024-02-22 08:27:23 -05:00
Brad King
312d0ccb6b Merge topic 'restore-link-interface-objlib-with-unity' into release-3.29
5b8e9e068f Restore support for TARGET_OBJECTS in link interfaces with unity builds
1313c78a9c Tests: Update RunCMake.TargetObjects cmake_minimum_required version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9279
2024-02-22 08:26:11 -05:00
Brad King
a4122c89c4 Merge topic 'cxxmodules-clang-resource-dir' into release-3.29
a3ada1a241 Clang: detect -resource-dir for clang-scan-deps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9274
2024-02-22 08:23:58 -05:00
Brad King
5b8e9e068f Restore support for TARGET_OBJECTS in link interfaces with unity builds
This was broken by commit df08c37a42 (cmGlobalGenerator: Add unity/pch
sources after computing compile features, 2024-02-02, v3.28.3~1^2~1^2),
and 3.28.2's commit 76b5383123 (cmGlobalGenerator: add unity sources
after computing target compile features, 2024-01-01, v3.28.2~17^2~1).

The problem is very similar to that fixed by commit 4e8f24e977 (PCH:
Clear link interface cache when adding PCH object to it, 2022-01-24,
v3.23.0-rc1~44^2~9).  Generalize that fix.

Fixes: #25696
2024-02-21 17:08:57 -05:00
Brad King
1313c78a9c Tests: Update RunCMake.TargetObjects cmake_minimum_required version
This was missed in commit 1edf138506 (Tests/RunCMake: Update
cmake_minimum_required versions, 2023-02-06, v3.27.0-rc1~508^2~1).
2024-02-21 16:22:35 -05:00
Brad King
6fca88cde1 Merge topic 'doc-BUILD_SHARED_LIBS' into release-3.29
01e33df83f Help: Modernize BUILD_SHARED_LIBS documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9278
2024-02-21 13:50:31 -05:00
Brad King
df1d81d284 Merge branch 'release-3.28' into release-3.29 2024-02-21 13:41:34 -05:00
Brad King
74957cacf8 Merge topic 'cxxmodules-transitive-std' into release-3.29
f0df692d21 Tests/CXXModules: test `cxx_std_20` coming from a dependency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9276
2024-02-21 13:37:43 -05:00
Brad King
c66396699b Merge topic 'cxxmodules-transitive-modules-usage' into release-3.29
ec348ee4b9 cmGeneratorTarget: discover synthetic targets recursively
67466ddf65 cmExportFileGenerator: export link libraries as-is
a2e3e61a31 Tests/CXXModules: test transitive modules usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9273
2024-02-21 13:34:34 -05:00
Brad King
0d3f35f495 Merge topic 'cxxmodules-transitive-std' into release-3.28
f0df692d21 Tests/CXXModules: test `cxx_std_20` coming from a dependency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9276
2024-02-21 13:29:36 -05:00
Brad King
edfdec287c Merge topic 'cxxmodules-transitive-modules-usage' into release-3.28
ec348ee4b9 cmGeneratorTarget: discover synthetic targets recursively
67466ddf65 cmExportFileGenerator: export link libraries as-is
a2e3e61a31 Tests/CXXModules: test transitive modules usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9273
2024-02-21 13:28:52 -05:00
Brad King
01e33df83f Help: Modernize BUILD_SHARED_LIBS documentation
Previously the documentation used long-outdated terminology from
CMake's early days.

Issue: #25699
2024-02-21 09:25:49 -05:00
Ben Boeckel
a3ada1a241 Clang: detect -resource-dir for clang-scan-deps
When cross-compiling, `clang-scan-deps` needs help to find the correct
location of core headers such as `stddef.h`. Always determine this path
and pass it when available.

Fixes: #25590
2024-02-21 08:51:42 -05:00
Brad King
6b8c99a1e3 Tests: Fix BuildDepends on macOS arm64 without rosetta 2024-02-21 08:39:37 -05:00
Ben Boeckel
f0df692d21 Tests/CXXModules: test cxx_std_20 coming from a dependency
Closes: #25569
2024-02-20 12:32:48 -05:00
Ben Boeckel
ec348ee4b9 cmGeneratorTarget: discover synthetic targets recursively
Fixes: #25288
2024-02-20 10:53:31 -05:00
Ben Boeckel
67466ddf65 cmExportFileGenerator: export link libraries as-is
This allows for transitive modules to work because
`$<COMPILE_ONLY>`-wrapped dependencies do not end up in the
`linked-target-dirs` collator property. Test suite exported property
tests updated to account for the change.
2024-02-20 10:53:31 -05:00
Ben Boeckel
a2e3e61a31 Tests/CXXModules: test transitive modules usage 2024-02-20 10:53:31 -05:00
Brad King
d2df2e94e5 Merge topic 'vs-17.10' into release-3.29
d256581bb0 VS: Fix '-T version=14.40' under VS 17.10 preview 1
3a7fbd04c8 VS: Verify toolset version= field format more strictly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9271
2024-02-20 10:36:00 -05:00
Brad King
aad37338c7 Merge branch 'release-3.28' into release-3.29 2024-02-20 10:32:42 -05:00
Brad King
dcdbdd82d5 Merge topic 'cxxmodules-transitive-target-usage' into release-3.29
8b6fc81fc3 cmTarget: copy link libraries from the right properties
d4a517f82a Tests/CXXModules: add a test with transitive targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9265
2024-02-20 10:30:25 -05:00
Brad King
583641ac92 Merge topic 'cxxmodules-transitive-target-usage' into release-3.28
8b6fc81fc3 cmTarget: copy link libraries from the right properties
d4a517f82a Tests/CXXModules: add a test with transitive targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9265
2024-02-20 10:29:18 -05:00
Brad King
d256581bb0 VS: Fix '-T version=14.40' under VS 17.10 preview 1
VS 17.10 preview 1 comes with toolset `v143` version `14.40`.  This is
the first time that the first three digits of the version do not match
the toolset name.  Add a special case to map version `14.40` back to
toolset `v143`.
2024-02-20 06:23:34 -05:00
Brad King
3a7fbd04c8 VS: Verify toolset version= field format more strictly
In commit 5f13168419 (VS: Add option to select the version of the
toolset used by VS 2017, 2018-05-19, v3.12.0-rc1~38^2) we added logic to
verify that the toolset version, such as `14.35`, matches the toolset
name, such as `v143`.  Clarify the logic to not construct a temporary
nonsensical toolset name like `v1435`.  Also verify the format of the
toolset version more strictly, e.g., to reject `14.350` earlier.
Previously the latter example was only rejected by the `.props` file not
existing.
2024-02-19 12:06:48 -05:00
Ben Boeckel
8b6fc81fc3 cmTarget: copy link libraries from the right properties
This fixes transitive dependencies' usage requirements not appearing
when compiling synthetic targets.

See: https://discourse.cmake.org/t/9819
2024-02-19 10:25:29 -05:00
Ben Boeckel
d4a517f82a Tests/CXXModules: add a test with transitive targets 2024-02-19 10:25:27 -05:00
Brad King
df4d6c7143 Merge branch 'release-3.28' into release-3.29 2024-02-19 09:24:49 -05:00
Brad King
00d908a01f Merge topic 'cxxmodules-nmc-duplicate-synthetic-targets' into release-3.28
5261af9424 cmGeneratorTarget: store synthetic targets in its cache
e0633a9517 Tests/CXXModules: add a test importing from a `Ninja` install
150d7dbd68 Tests/CXXModules: support building a project with `Ninja`
e48e5e5506 Tests/CXXModules: document `CMake_TEST_MODULE_COMPILATION` items

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9263
2024-02-19 09:23:58 -05:00
Brad King
f18ba02d7e Merge topic 'cxxmodules-nmc-duplicate-synthetic-targets' into release-3.29
5261af9424 cmGeneratorTarget: store synthetic targets in its cache
e0633a9517 Tests/CXXModules: add a test importing from a `Ninja` install
150d7dbd68 Tests/CXXModules: support building a project with `Ninja`
e48e5e5506 Tests/CXXModules: document `CMake_TEST_MODULE_COMPILATION` items

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9263
2024-02-19 09:23:21 -05:00
Brad King
c5c26719c3 Merge topic 'ci-wix-3.14' into release-3.29
adb6af6959 ci: host WiX 3.14.0.8606 binaries ourselves
4c32b3690d ci: update to WiX 3.14.0.8606 release

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9264
2024-02-19 09:20:34 -05:00
Brad King
adb6af6959 ci: host WiX 3.14.0.8606 binaries ourselves
Follow the approach from commit 9ff7fffbf4 (ci: host WiX 3.14.0.6526
binaries ourselves, 2022-08-02, v3.24.0~6^2) for the updated version.
Since we use WiX to package our official release binaries, avoid relying
on an externally-hosted package by hosting it at `cmake.org`.
2024-02-16 13:08:23 -05:00
Ben Boeckel
5261af9424 cmGeneratorTarget: store synthetic targets in its cache
The synthetic target cache was never actually updated, so record them in
the cache so that reuses can actually be discovered.

Fixes: #25568
2024-02-16 11:09:56 -05:00
Ben Boeckel
e0633a9517 Tests/CXXModules: add a test importing from a Ninja install
This ensures that consuming from a single configuration generator works
in all generators.

See: #25568
2024-02-16 11:09:56 -05:00
Ben Boeckel
150d7dbd68 Tests/CXXModules: support building a project with Ninja
This allows testing mixed generator setups.
2024-02-16 11:09:54 -05:00
Brad King
4c32b3690d ci: update to WiX 3.14.0.8606 release
This official 3.14 release supports the `arm64` architecture.
Previously we used a development version for that.
2024-02-16 10:53:03 -05:00
Ben Boeckel
e48e5e5506 Tests/CXXModules: document CMake_TEST_MODULE_COMPILATION items 2024-02-16 10:28:10 -05:00
Brad King
559231aec3 Merge topic 'doc-install-relative-paths' into release-3.29
af293ff7c3 Help: Explicitly discourage absolute install destinations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9261
2024-02-16 10:08:18 -05:00
Robert Maynard
af293ff7c3 Help: Explicitly discourage absolute install destinations
Document some of the problems caused by absolute install destinations.
Encourage use of relative paths.
2024-02-16 09:53:55 -05:00
Brad King
4398b60ac6 Merge topic 'ipo-ar-no-replace' into release-3.29
2d72a861d7 IPO: Support duplicate object names in large archives

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9258
2024-02-16 09:48:46 -05:00
Brad King
b0efe5e7c5 Merge branch 'release-3.28' into release-3.29 2024-02-16 09:44:44 -05:00
Brad King
0e60e84d35 Merge topic 'cxxmodules-dyndep-error-on-private-usage' into release-3.29
3f8a59a05c cxxmodules: return failure from the collator when private usage is found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9257
2024-02-16 09:41:20 -05:00
Brad King
fb0988a276 Merge topic 'cxxmodules-dyndep-error-on-private-usage' into release-3.28
3f8a59a05c cxxmodules: return failure from the collator when private usage is found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9257
2024-02-16 09:40:07 -05:00
Brad King
273463aaa9 Merge topic 'cxxmodules-collation-restat' into release-3.29
a7424b636b Ninja: make the collator rule use `restat = 1`
e24eecfc33 Tests/CXXModules: add a test to ensure that `restat` works for collation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9259
2024-02-16 09:32:15 -05:00
Brad King
d713896171 Merge topic 'cxxmodules-collation-restat' into release-3.28
a7424b636b Ninja: make the collator rule use `restat = 1`
e24eecfc33 Tests/CXXModules: add a test to ensure that `restat` works for collation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9259
2024-02-16 09:30:50 -05:00
Brad King
00fcb1dc81 Merge topic 'cxxmodules-visibility-change-rebuild' into release-3.29
60a8736378 cmNinjaTargetGenerator: scanning depends on the module metadata
52036ce090 Tests/CXXModules: test that objects depend on dependent modules json files
9a45c9fbd5 cmNinjaTargetGenerator: use `emplace_back` for scanning deps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9247
2024-02-16 09:26:49 -05:00
Brad King
d8fd8c2cb1 Merge topic 'cxxmodules-visibility-change-rebuild' into release-3.28
60a8736378 cmNinjaTargetGenerator: scanning depends on the module metadata
52036ce090 Tests/CXXModules: test that objects depend on dependent modules json files
9a45c9fbd5 cmNinjaTargetGenerator: use `emplace_back` for scanning deps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9247
2024-02-16 09:22:32 -05:00
Brad King
97132612f6 Merge topic 'cxxmodules-depend-on-modmap-file' into release-3.29
363300ace5 cxxmodules: depend on the modmap contents
940628d48d Tests/CXXModules: test that objects depend on their modmap files
681ee92030 Tests/CXXModules: support testing rebuild conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9248
2024-02-16 09:20:52 -05:00
Brad King
2808c49d82 Merge topic 'cxxmodules-depend-on-modmap-file' into release-3.28
363300ace5 cxxmodules: depend on the modmap contents
940628d48d Tests/CXXModules: test that objects depend on their modmap files
681ee92030 Tests/CXXModules: support testing rebuild conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9248
2024-02-16 09:20:09 -05:00
Brad King
01e6cfc1f1 Merge topic 'ci-test-CommandLength' into release-3.29
edb833d69e Tests/CommandLength: Refactor test commands to reduce test run time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9256
2024-02-16 09:17:57 -05:00
Brad King
148af75e86 Merge topic 'ci-test-CommandLength' into release-3.28
edb833d69e Tests/CommandLength: Refactor test commands to reduce test run time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9256
2024-02-16 09:17:14 -05:00