Commit Graph

35260 Commits

Author SHA1 Message Date
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
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
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
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
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
1223c9a398 Merge topic 'cmake-language-exit-code' into release-3.29
86698eea85 cmake_language: Fix EXIT inside control flow blocks
a3033d1a06 Tests: Remove unnecessary RunCMake.cmake_language expected result files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9250
2024-02-15 12:57:56 -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
b13aca575e Merge topic 'cxxmodules-collapse-source-paths' into release-3.29
0f0d853de7 cmDyndepCollation: collapse full path before looking up

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9249
2024-02-15 12:54:39 -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
60a8736378 cmNinjaTargetGenerator: scanning depends on the module metadata
Fixes: #25531
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
3f8a59a05c cxxmodules: return failure from the collator when private usage is found 2024-02-14 20:26:59 -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
86698eea85 cmake_language: Fix EXIT inside control flow blocks
These were missed in commit 1bb1769235 (cmake_language: Add EXIT
subcommand, 2024-01-05, v3.29.0-rc1~112^2).

Fixes: #25674
2024-02-14 08:51:48 -05:00
Brad King
105cb4ee02 CMake 3.29.0-rc1 2024-02-13 09:07:34 -05:00
Brad King
f3acc9b1ce Merge topic 'autogen-rcc-zstd' into release-3.29
9e87df4d46 Autogen/RCC: Disable zstd if it is not supported

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: alcroito <alexandru.croitor@qt.io>
Merge-request: !9232
2024-02-12 10:51:11 -05:00
Brad King
871a4c5aac Merge branch 'backport-3.28-visionOS' into visionOS 2024-02-09 11:37:11 -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
Orkun Tokdemir
9e87df4d46 Autogen/RCC: Disable zstd if it is not supported
Add the `--no-zstd` argument for `RCC` when `QT_FEATURE_zstd` is `OFF`.
This causes user project builds to fail.  That bug is fixed in Qt
by https://codereview.qt-project.org/c/qt/qtbase/+/537546 but for
the older versions, fix it here too.

Fixes: #25664
2024-02-09 09:10:41 -05:00
Brad King
de66a70b73 Merge topic 'libuv-1.48' into release-3.29
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:58:44 -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
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
d968391a0f Merge topic 'doc-autogen' into release-3.29
ccaf529c4e Autogen: Update Documentation
16cc011fa5 cmQtAutoGenGlobalInitializer: Improve Const-correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9223
2024-02-08 11:10:47 -05:00
Brad King
78c5c81d35 Begin 3.29 release versioning 2024-02-06 14:49:38 -05:00
Orkun Tokdemir
16cc011fa5 cmQtAutoGenGlobalInitializer: Improve Const-correctness 2024-02-06 16:02:35 +01:00
Kitware Robot
908b4ba54d CMake Nightly Date Stamp 2024-02-06 00:01:11 -05:00
Brad King
5e984bb352 CMake 3.28.3 2024-02-05 10:28:25 -05:00
Brad King
666d2e6451 Merge topic 'restore-pch-with-unity'
30829da506 Unity: Clarify source comments on unity build transformation
87bf1c6c33 Merge branch 'unity-after-compile-features' into restore-pch-with-unity
df08c37a42 cmGlobalGenerator: Add unity/pch sources after computing compile features
004c3c3986 Tests: Add case covering PCH in a unity build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9215
2024-02-05 09:57:19 -05:00
Kitware Robot
ae667813de CMake Nightly Date Stamp 2024-02-05 00:01:36 -05:00
Kitware Robot
b29fdbca36 CMake Nightly Date Stamp 2024-02-04 00:01:08 -05:00
Kitware Robot
ba17f5a8d1 CMake Nightly Date Stamp 2024-02-03 00:01:11 -05:00
Brad King
b8ee9db223 Merge topic 'msys-system-name'
607051f266 MSYS,CYGWIN: Hard-code host system names when built for these runtimes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Peter Kokot <peterkokot@gmail.com>
Merge-request: !9213
2024-02-02 10:28:54 -05:00
Brad King
30829da506 Unity: Clarify source comments on unity build transformation 2024-02-02 09:43:27 -05:00
Brad King
87bf1c6c33 Merge branch 'unity-after-compile-features' into restore-pch-with-unity
Replace commit 76b5383123 (cmGlobalGenerator: add unity sources after
computing target compile features, 2024-01-01, v3.28.2~17^2~1) with an
alternative change.  This merge commit resolves conflicts such that
future `git blame` calls will follow the second parent for the relevant
lines and pretend the replaced commit never existed.

Fixes: #25650
2024-02-02 09:43:15 -05:00
Brad King
df08c37a42 cmGlobalGenerator: Add unity/pch sources after computing compile features
Sources that will be scanned for C++ module dependencies need to be
excluded from unity builds.  We need to compute compile features in
order to know which sources will be scanned.  Unity build and PCH
sources can be added afterward without changing the compile features.

This re-implements commit 76b5383123 (cmGlobalGenerator: add unity
sources after computing target compile features, 2024-01-01,
v3.28.2~17^2~1) using a simpler approach that also preserves support for
PCH with Unity builds.

Issue: #25650
Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
2024-02-02 09:39:13 -05:00
Kitware Robot
2c3509136f CMake Nightly Date Stamp 2024-02-02 00:01:09 -05:00
Brad King
607051f266 MSYS,CYGWIN: Hard-code host system names when built for these runtimes
When CMake is built against the MSYS runtime library, `uname()` returns
a name that depends on the `MSYSTEM` environment variable.  Previously
we truncated `MSYS_...` to just `MSYS`, but outside `MSYSTEM=MSYS`
environments, names like `MINGW64_NT-10.0-22000` were reported.

The latter causes CMake to report an unsupported-platform error, which
users report as an issue when the real problem is that they should be
using a `MSYSTEM=MSYS` environment or a CMake that is not built against
the MSYS runtime.

For our purposes, if CMake is built against the MSYS runtime, the host
platform is always `MSYS`.  Similarly for `CYGWIN`.
2024-02-01 11:48:32 -05:00
Brad King
58d424bca1 Merge topic 'add_custom_command-target-alias'
3b07ec631d add_custom_command: Allow adding build event via ALIAS target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9201
2024-02-01 08:32:20 -05:00
Chen Linxuan
3b07ec631d add_custom_command: Allow adding build event via ALIAS target
Signed-off-by: Chen Linxuan <me@black-desk.cn>
2024-02-01 08:21:41 -05:00
Kitware Robot
2ff91f5fc4 CMake Nightly Date Stamp 2024-02-01 00:01:07 -05:00
Brad King
2a00813842 Merge topic 'xcode-pch-swift-cxx'
77c4d2f9a2 Xcode: Fix PCH support with Swift & C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9203
2024-01-31 09:01:45 -05:00