Commit Graph

35334 Commits

Author SHA1 Message Date
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
Kitware Robot
4584cfeb48 CMake Nightly Date Stamp 2024-01-31 00:01:10 -05:00
Mikko Lehtonen
77c4d2f9a2 Xcode: Fix PCH support with Swift & C++
Previously, when a mixed language target ends up with `Swift` as the
`LINKER_LANGUAGE`, the PCH file was not set for the target at all.

Fixes: #21224
2024-01-30 12:50:40 -05:00
Kitware Robot
3cd2c59ecf CMake Nightly Date Stamp 2024-01-30 00:01:09 -05:00
Brad King
1f25aa1a0a CMake 3.28.2 2024-01-29 15:01:32 -05:00
Brad King
622a498477 Merge topic 'test-launcher-emulator-genex'
13ece67a58 Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATOR
b9ad73fcb2 cmTestGenerator: De-duplicate TEST_LAUNCHER and CROSSCOMPILING_EMULATOR impl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9198
2024-01-29 10:50:34 -05:00
Brad King
28e89baa22 Merge topic 'autogen-makefile-depfile'
d0bedb2170 Autogen: Forward dependencies when both Makefile and DEPFILE are used
4deb9c41b8 cmQtAutoGenInitializer: Improve Const-correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9190
2024-01-29 10:43:45 -05:00
Brad King
d377ccbf67 Merge topic 'productbuild-domains-policy'
339ae33e55 CPack: Change CPACK_PRODUCTBUILD_DOMAINS default to true (CMP0161)
4e7f2397e4 CPack: Clear temporary variable after it is no longer needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9197
2024-01-29 10:36:22 -05:00
Brad King
13ece67a58 Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATOR
Evaluate generator expressions in these properties, as they apply to
`add_test`, `add_custom_command`, and `add_custom_target`.

The `CMAKE_CROSSCOMPILING_EMULATOR` variable's `try_run` behavior occurs
at configure time and so cannot support generator expressions.
2024-01-29 10:30:24 -05:00
Brad King
b9ad73fcb2 cmTestGenerator: De-duplicate TEST_LAUNCHER and CROSSCOMPILING_EMULATOR impl 2024-01-29 10:29:45 -05:00
Kitware Robot
9d081a071e CMake Nightly Date Stamp 2024-01-29 00:01:31 -05:00
Orkun Tokdemir
d0bedb2170 Autogen: Forward dependencies when both Makefile and DEPFILE are used
Since commit ebc9e448b3 (Autogen: Add depfile support for Makefiles,
2023-09-07, v3.28.0-rc1~101^2~1) CMake does not generate the correct
dependency graph when both `Makefile` and `DEPFILE` are used.
The build of `<target_name>_autogen_timestamp_deps` fails due to
missing dependencies.  To tackle that problem, forward target
dependencies to both `<target_name>_autogen_timestamp_deps` and
`<target_name>_autogen` instead of just `<target_name>_autogen`.

Fixes: #25600
2024-01-28 09:40:47 -05:00
Craig Scott
339ae33e55 CPack: Change CPACK_PRODUCTBUILD_DOMAINS default to true (CMP0161)
Fixes: #23351
2024-01-28 21:09:12 +11:00
Kitware Robot
f0d958d0b4 CMake Nightly Date Stamp 2024-01-28 00:01:08 -05:00
Kitware Robot
98d065740e CMake Nightly Date Stamp 2024-01-27 00:01:11 -05:00
Brad King
b7c11ded92 Merge topic 'stdio-streams-always'
96010cc968 Ensure stdin, stdout, stderr FILE streams are open on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9189
2024-01-26 10:15:47 -05:00
Brad King
d9b9f63083 Merge topic 'ctest-tests-from-file'
701029726f ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE
dbacc1d5a8 ctest: add command line option to exclude tests listed in a given file
022f20f663 ctest: add command line option to run the tests listed in a given file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9128
2024-01-26 10:14:58 -05:00
Orkun Tokdemir
4deb9c41b8 cmQtAutoGenInitializer: Improve Const-correctness 2024-01-26 09:50:35 -05:00
Kitware Robot
60f9b0fd99 CMake Nightly Date Stamp 2024-01-26 00:01:10 -05:00
Brad King
96010cc968 Ensure stdin, stdout, stderr FILE streams are open on Windows
Extend commit c85524a94a (Ensure stdin, stdout, and stderr pipes are always
open, 2019-05-02, v3.15.0-rc1~171^2) to cover the `stdin`, `stdout`, and
`stderr` FILE streams from `<stdio.h>`.

Issue: #25625
2024-01-25 12:42:12 -05:00
Alex Neundorf
701029726f ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE
These options can be used to specify files which can be used
to restrict the set of tests that will be executed.

Fixes: #25455
2024-01-25 12:38:04 -05:00
Alex Neundorf
dbacc1d5a8 ctest: add command line option to exclude tests listed in a given file
Add `--exclude-from-file <filename>` to exclude the tests listed in the
given file.

Issue: #25455
2024-01-25 12:37:56 -05:00
Alex Neundorf
022f20f663 ctest: add command line option to run the tests listed in a given file
Add `--tests-from-file <filename>` to run only the tests listed in the
given file.  The test names must match exactly, no regexps or something.
The listed tests can still be filtered with a regexp using -R.

Issue: #25455
2024-01-25 12:37:16 -05:00
Brad King
b11c8c45f9 Merge topic 'cmuvprocesschain'
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
116bb2b70f cmUVProcessChain: Simplify builder initialization
d32c30906a Tests: Add missing include in testUVProcessChainHelper on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9181
2024-01-25 10:40:02 -05:00
Kitware Robot
a8f0e34790 CMake Nightly Date Stamp 2024-01-25 00:01:07 -05:00
Brad King
bcbb212df7 Revert use of libuv for process execution for 3.28
Wide use of CMake 3.28.{1,0[-rcN]} has uncovered some hangs and crashes
in libuv SIGCHLD handling on some platforms, particularly in virtualization
environments on macOS hosts.  Although the bug does not seem to be in CMake,
we can restore stability in the CMake 3.28 release series for users of such
platforms by reverting our new uses of libuv for process execution.

Revert implementation changes merged by commit 4771544386 (Merge topic
'replace-cmsysprocess-with-cmuvprocesschain', 2023-09-06, v3.28.0-rc1~138),
but keep test suite updates.

Issue: #25414, #25500, #25562, #25589
2024-01-24 17:10:00 -05:00
Brad King
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
On Windows, in a GUI process without a console, the `std{in,out,err}`
standard FILE streams may not be open.  Avoid passing an invalid file
descriptor to the child process, and let libuv attach NUL instead.

Fixes: #25625
2024-01-24 16:59:49 -05:00