Commit Graph

63853 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Ben Boeckel
e48e5e5506 Tests/CXXModules: document CMake_TEST_MODULE_COMPILATION items 2024-02-16 10:28:10 -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
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
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
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
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
Brad King
403af46bfe Merge branch 'backport-3.28-visionOS' into release-3.28
dbfc53a2bf Help: Add 3.28.4 release note draft for visionOS updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9262
2024-02-15 14:33:48 -05:00
Brad King
dbfc53a2bf Help: Add 3.28.4 release note draft for visionOS updates
Hide it in a Sphinx comment pending the actual 3.28.4 release.

Issue: #25266
2024-02-15 13:16:15 -05:00
Brad King
c8da7b0f5c Merge topic 'cxxmodules-collapse-source-paths' into release-3.28
0f0d853de7 cmDyndepCollation: collapse full path before looking up

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9249
2024-02-15 12:55:28 -05:00
Brad King
edb833d69e Tests/CommandLength: Refactor test commands to reduce test run time
Since 2024-02-09 or so this test frequently times out on a few of our
Windows CI runners. Use fewer but longer command lines to achieve a
similar total command length.  By running fewer commands, the test
takes much less time.
2024-02-15 09:40:13 -05:00
Ben Boeckel
a7424b636b Ninja: make the collator rule use restat = 1
This avoids rebuilds when the module metadata does not change.
2024-02-14 23:01:25 -05:00
Ben Boeckel
e24eecfc33 Tests/CXXModules: add a test to ensure that restat works for collation
Also update the `modules-json-file` test to account for the fact that
`CXXModules.json` is not updated for timestamp-only rebuild triggers.

See: #25511
2024-02-14 23:01:25 -05:00
Ben Boeckel
60a8736378 cmNinjaTargetGenerator: scanning depends on the module metadata
Fixes: #25531
2024-02-14 22:36:37 -05:00
Ben Boeckel
52036ce090 Tests/CXXModules: test that objects depend on dependent modules json files 2024-02-14 22:36:37 -05:00
Ben Boeckel
9a45c9fbd5 cmNinjaTargetGenerator: use emplace_back for scanning deps 2024-02-14 20:38:06 -05:00
Ben Boeckel
363300ace5 cxxmodules: depend on the modmap contents
If the modmap changes, we need to recompile. It is not just a file that
needs to exist to compile.

Fixes: #25511
2024-02-14 20:36:47 -05:00
Ben Boeckel
940628d48d Tests/CXXModules: test that objects depend on their modmap files 2024-02-14 20:36:47 -05:00
Ben Boeckel
3f8a59a05c cxxmodules: return failure from the collator when private usage is found 2024-02-14 20:26:59 -05:00
Ben Boeckel
681ee92030 Tests/CXXModules: support testing rebuild conditions 2024-02-14 14:34:07 -05:00
Ben Boeckel
0f0d853de7 cmDyndepCollation: collapse full path before looking up
`cmSourceFile::GetFullPath()` performs a `CollapseFullPath` before
storing the path. Match this behavior when looking up paths from the
source file set constructions.

Fixes: #25614
2024-02-14 11:51:05 -05:00
Brad King
52b1bb0823 Merge topic 'backport-3.28-visionOS' into release-3.28
22eb1b6d67 Tests: Enable visionOS tests with Xcode 15.2
f6fa34839c Tests: Update RunCMake.XcodeProject-Device for visionOS in Xcode 15.1 beta
40be88a92e visionOS: Update deployment-target flag for Xcode 15.1 beta
3ece4553c2 cmLocalGenerator: Avoid unnecessary lookup without a deployment target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9239
2024-02-12 10:46:45 -05:00
Brad King
22eb1b6d67 Tests: Enable visionOS tests with Xcode 15.2
Xcode 15.2 officially includes the visionOS SDKs.

Fixes: #25266
2024-02-09 11:32:33 -05:00
Brad King
f6fa34839c Tests: Update RunCMake.XcodeProject-Device for visionOS in Xcode 15.1 beta
The target identification macros changed since the 15.0 beta.
2024-02-09 11:32:23 -05:00
Brad King
40be88a92e visionOS: Update deployment-target flag for Xcode 15.1 beta
Use the same flags Xcode adds for `XROS_DEPLOYMENT_TARGET`.  They are
`-target arm64-apple-xros1.0` and `-target arm64-apple-xros1.0-simulator`,
where `1.0` is the deployment target version.

Fixes: #25188
2024-02-09 11:32:13 -05:00
Brad King
3ece4553c2 cmLocalGenerator: Avoid unnecessary lookup without a deployment target 2024-02-09 11:32:13 -05:00
Brad King
9e80593bca Merge topic 'ci-xcode-15.2' into release-3.28
68157fc57d gitlab-ci: update macOS jobs to use Xcode 15.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9237
2024-02-09 09:01:18 -05:00
Brad King
1c05251433 Merge topic 'FindCUDAToolkit-cudart-deps' into release-3.28
4a3cafec4f FindCUDAToolkit: Fix cudart dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9236
2024-02-09 09:00:46 -05:00
Brad King
938a28637c Merge topic 'libuv-1.48' into release-3.28
077a1d5769 libuv: win/spawn: optionally run executable paths with no file extension
f02ac51150 libuv: Revert "win/spawn: run executables with no file extension"
58a271e60b cmUVProcessChain: Implement no-extension-on-Windows support with libuv 1.48

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9238
2024-02-09 08:59:04 -05:00
Brad King
077a1d5769 libuv: win/spawn: optionally run executable paths with no file extension
Backport libuv commit `3f7191e5` (win/spawn: optionally run executable
paths with no file extension, 2024-02-05, v1.48.0~8) to add the
`UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME` option we now use.

Issue: #25450
2024-02-08 17:00:47 -05:00
Brad King
f02ac51150 libuv: Revert "win/spawn: run executables with no file extension"
This reverts commit fc6231bee5 (libuv: win/spawn: run executables with
no file extension, 2023-12-04, v3.28.0~9^2) to make room for the
corresponding fix from upstream libuv 1.48.

Record this as a merge from the last-imported upstream libuv snapshot
branch so that future `git blame` points to the upstream for the
original code instead of this commit.

Issue: #25450
2024-02-08 16:47:06 -05:00
Brad King
58a271e60b cmUVProcessChain: Implement no-extension-on-Windows support with libuv 1.48
Use the new `UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME` option when
building against libuv 1.48 or higher.
2024-02-08 16:46:53 -05:00
Brad King
68157fc57d gitlab-ci: update macOS jobs to use Xcode 15.2 2024-02-08 16:28:16 -05:00
Robert Maynard
4a3cafec4f FindCUDAToolkit: Fix cudart dependencies
Fixes: #25665
2024-02-08 12:57:13 -05:00
Brad King
f4b5152f47 Merge topic 'findmatlab-registry-lookup-without-versionxml' into release-3.28
e22c4dfea0 FindMatlab: Revert undocumented and now-unnecessary full version lookup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9226
2024-02-08 09:40:05 -05:00
Hermann von Kleist
e22c4dfea0 FindMatlab: Revert undocumented and now-unnecessary full version lookup
Partially revert commit dc9d9589e4 (FindMatlab:WIN32: return full Matlab
version when found via registry, 2023-09-14, v3.28.0-rc1~82^2~2).  It
changed `matlab_extract_all_installed_versions_from_registry` behavior
to query `VersionInfo.xml` for version information.  However, the
function documentation states that it only uses the registry.  It's also
not needed since commit c608adc236 (FindMatlab: Fix major.minor version
lookups in Windows Registry, 2024-01-11, v3.28.2~13^2~1), which added
the same lookup to `matlab_get_all_valid_matlab_roots_from_registry`.
2024-02-07 12:12:12 -05:00
Brad King
a98f3631c9 Merge topic 'clang-cl-showIncludes' into release-3.28
0d933fc0d9 Ninja: Update showIncludes prefix detection for clang-cl 18
a88acb0a41 Tests/RunCMake/Ninja: Rename showIncludes case for clang-cl <= 17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9229
2024-02-07 10:35:32 -05:00
Martin Storsjö
0d933fc0d9 Ninja: Update showIncludes prefix detection for clang-cl 18
Since commit LLVM/Clang commit `5523fefb01c2` ([clang][lex] Use
preferred path separator in includer-relative lookup, 2023-09-08), part
of the upcoming 18.x release, the output format of the showIncludes flag
has changed, where it now prints paths with double backslashes:

    Note: including file: .\\foo.h

Previously, we expected to see the path name in the form "./foo.h".

Extend the regex to match a path name starting with `.\`, in addition to
the existing matched patterns.
2024-02-07 09:38:14 -05:00
Brad King
a88acb0a41 Tests/RunCMake/Ninja: Rename showIncludes case for clang-cl <= 17
Make room for a new case for clang-cl 18.
2024-02-07 09:31:42 -05:00
Brad King
5e984bb352 CMake 3.28.3 v3.28.3 2024-02-05 10:28:25 -05:00