Commit Graph

65217 Commits

Author SHA1 Message Date
Brad King
928571f3c2 CMake 3.29.7 2024-07-16 13:14:29 -04:00
Brad King
ee6ff50cba Merge branch 'release-3.28' into release-3.29 2024-07-02 08:07:43 -04:00
Brad King
012bca3ccb Merge topic 'ctest-windows-std-handles' into release-3.28
e4d0169107 ctest: Fix spurious build failures with CTEST_USE_LAUNCHERS on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9598
2024-07-02 08:07:09 -04:00
Brad King
be53dcdda6 Merge topic 'vs-17.11' into release-3.29
dfe0f3f358 VS: Fix '-T version=14.4x' under VS 17.1x

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9622
2024-06-24 09:43:02 -04:00
Brad King
1deb543089 Merge topic 'libuv-macos-kqueue' into release-3.29
422c1de564 libuv: macos: restore use of kqueue instead of posix poll
7e3519e705 libuv: macos: reap child processes more reliably when using kqueue

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9619
2024-06-24 09:37:18 -04:00
Brad King
1c4c5ad545 Merge topic 'ctest-windows-std-handles' into release-3.29
e4d0169107 ctest: Fix spurious build failures with CTEST_USE_LAUNCHERS on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9598
2024-06-24 09:36:19 -04:00
Brad King
dfe0f3f358 VS: Fix '-T version=14.4x' under VS 17.1x
Starting with VS 17.10 the v143 toolset reserves versions `14.30`
through `14.49`.  This is the first time that the first three digits of
the version do not match the toolset name.  Extend the special case from
commit d256581bb0 (VS: Fix '-T version=14.40' under VS 17.10 preview 1,
2024-02-19, v3.29.0-rc2~10^2) to cover the entire reserved version range.
2024-06-24 08:47:33 -04:00
Brad King
422c1de564 libuv: macos: restore use of kqueue instead of posix poll
Revert commit f54ec4e7f9 (libuv: macos: use posix poll instead of
kqueue, 2024-03-31, v3.29.1~7^2) and its parent.  It is not necessary
after the kqueue-based implementation was fixed to reap child processes
more reliably.

Issue: #25839
2024-06-21 16:45:55 -04:00
Brad King
7e3519e705 libuv: macos: reap child processes more reliably when using kqueue
Backport libuv commit `42cc412c4a` (darwin,process: feed kevent the
signal to reap children, 2023-02-01, `v1.45.0~55`) from libuv PR 3893.

Fixes: #25839
2024-06-21 15:01:15 -04:00
Brad King
cdc901797a CMake 3.29.6 2024-06-17 14:49:43 -04:00
Brad King
296fdc0df1 Merge topic 'vs-quote-semicolons' into release-3.29
9b672e8075 VS: Quote custom command arguments containing semicolons

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9597
2024-06-14 09:24:48 -04:00
Brad King
9b672e8075 VS: Quote custom command arguments containing semicolons
The `GoogleTest` module needs this to pass the `TEST_EXECUTOR`
definition to its `GoogleTestAddTests.cmake` helper script in
the `POST_BUILD` command since commit f875c479f5 (GoogleTest: Honor
TEST_LAUNCHER in gtest_discover_tests, 2024-01-17, v3.29.0-rc1~34^2).
Previously it worked only if other characters, such as spaces,
caused the argument to be quoted.  This was exposed by running the
`RunCMake.GoogleTest` test in a path without spaces.

Reported-by: Garrett Campbell <gcampbell@microsoft.com>
2024-06-14 08:24:21 -04:00
Brad King
e4d0169107 ctest: Fix spurious build failures with CTEST_USE_LAUNCHERS on Windows
Remove the stdio handle inheritance suppression originally added by
commit f262298bb0 (... do not inherit pipes in child procs for ctest so
it can kill them, 2007-09-11, v2.6.0~1136).  It's not clear what problem
it was trying to solve, was only done in `ctest` and not `cmake`, and
since commit 9c3ffe2474 (BUG: fix problem with stdout and stderr not
showing up in ms dos shells, 2007-09-25, v2.6.0~1066) has not been done
in `ctest` launched under interactive consoles.

Furthermore, the code has been spuriously breaking stdio when `ctest` is
started with both stdout and stderr connected to the same pipe, such as
when `ctest --launch` is used under `ninja`.  This is because it used
`DuplicateHandle` with `DUPLICATE_CLOSE_SOURCE` on the stdout handle and
then the stderr handle.  If the handles are the same, then the stderr
handle becomes invalid in between these operations, leading to
likely-undefined behavior.  Since commit 96b3dd329e
(cmCTestLaunchReporter: Replace cmsysProcess with cmUVProcessChain,
2023-07-26, v3.28.0-rc1~138^2~2) this became more noticeable because
`uv_spawn` performs additional verification on stdio handles.

This could be fixed by instead suppressing inheritance via

    SetHandleInformation(h, HANDLE_FLAG_INHERIT, 0);

However, the functionality no longer seems necessary, so remove it.
2024-06-14 07:32:29 -04:00
Brad King
7c6dcba646 Merge branch 'release-3.28' into release-3.29 2024-06-11 10:56:10 -04:00
Brad King
578ba81424 Merge topic 'clang-ansi-color' into release-3.29
1004cc2b52 Clang: Drop non-existent -fno-ansi-escape-codes flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9592
2024-06-11 10:55:59 -04:00
Brad King
63b12b7702 Merge topic 'clang-ansi-color' into release-3.28
1004cc2b52 Clang: Drop non-existent -fno-ansi-escape-codes flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9592
2024-06-11 10:55:18 -04:00
Brad King
1004cc2b52 Clang: Drop non-existent -fno-ansi-escape-codes flag
In commit 74b5fae52d (Clang: Use -fno-ansi-escape-codes for color
diagnostics on Windows, 2023-10-19, v3.28.0-rc3~3^2) we added the
positive option `-fansi-escape-codes` and the negative form of
the option, `-fno-ansi-escape-codes`.  According to the LLVM/Clang
documentation:

* https://releases.llvm.org/18.1.4/tools/clang/docs/UsersManual.html#cmdoption-fansi-escape-codes

only the positive form of the option exists.

Fixes: #26036
2024-06-10 09:23:41 -04:00
Brad King
facfba088f CMake 3.29.5 2024-06-06 08:57:14 -04:00
Brad King
74e233e8f5 Merge topic 'backport-3.29-cpack-wix-scope-default' into release-3.29
0167089484 CPack/WiX: Restore default (missing) InstallScope from 3.28 and lower

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9586
2024-06-06 08:32:00 -04:00
Brad King
20d1f96dac Merge topic 'ctest-jobserver-fifo-hang' into release-3.29
ff077af032 ctest: Set close-on-exec for jobserver FIFO

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9580
2024-06-06 08:31:29 -04:00
Brad King
0167089484 CPack/WiX: Restore default (missing) InstallScope from 3.28 and lower
In commit 60661f6770 (CPack/WiX: Make InstallScope configurable,
2023-11-07, v3.29.0-rc1~413^2) the `CPACK_WIX_INSTALL_SCOPE` default was
set to `perMachine`.  While installers created with `perMachine` have
better behavior on their own than installers created without any
`InstallScope`, they do not cleanly convert existing installations on
updates.

Fixes: #26029
2024-06-05 13:47:36 -04:00
Joan Bruguera Micó
ff077af032 ctest: Set close-on-exec for jobserver FIFO
Set the close-on-exec flag to prevent the jobserver FIFO file
descriptor from leaking to subprocesses spawned by `ctest`.

This leak is usually harmless, but can cause `make test -jN` to hang
at the end of the build if a test leaves a background process running
with the jobserver FIFO file descriptor open.

Fixes: #26027
2024-06-05 09:37:05 -04:00
Brad King
efaa9efece CMake 3.29.4 2024-06-03 14:28:41 -04:00
Brad King
5b1669d225 Merge branch 'release-3.28' into release-3.29 2024-06-03 14:16:47 -04:00
Brad King
9f72ac3644 CMake 3.28.6 2024-06-03 13:35:26 -04:00
Brad King
f952513823 Merge topic 'msvc-v143-versions' into release-3.29
3873574f89 Help: Update MSVC_VERSION range for VS 17.10's MSVC 14.40 toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9554
2024-05-30 10:00:53 -04:00
Brad King
3873574f89 Help: Update MSVC_VERSION range for VS 17.10's MSVC 14.40 toolset
According to this blog post:

* https://devblogs.microsoft.com/cppblog/msvc-toolset-minor-version-number-14-40-in-vs-2022-v17-10/

the 14.40 through 14.49 version range will be used by the v143 toolsets.

Fixes: #26015
2024-05-29 11:48:08 -04:00
Brad King
1885903a76 Merge branch 'release-3.28' into release-3.29 2024-05-29 08:30:48 -04:00
Brad King
f2ea85f516 Merge topic 'update-kwsys' into release-3.29
98dd754b62 KWSys: ConsoleBuf: Fix test case when running under Windows Terminal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9553
2024-05-29 08:30:10 -04:00
Brad King
713bca2677 Merge topic 'backport-kwsys-ConsoleBuf-windows-terminal' into release-3.28
98dd754b62 KWSys: ConsoleBuf: Fix test case when running under Windows Terminal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9553
2024-05-29 08:28:54 -04:00
Brad King
98dd754b62 KWSys: ConsoleBuf: Fix test case when running under Windows Terminal
Our test case writes a NUL byte to the console to test its behavior.
The behavior of Windows Terminal differs from Windows Console Host
(conhost.exe).  Detect which of these is in use at runtime and adjust
our expected result accordingly.
2024-05-28 09:11:56 -04:00
Brad King
0b2c781cb7 Merge branch 'release-3.28' into release-3.29 2024-05-28 09:00:55 -04:00
Brad King
522925206c Merge topic 'execute_process-child-startup-info' into release-3.29
fa8c04b421 Tests/RunCMake/execute_process: Check STARTUPINFOW reserved members
d98df689ab Merge branch 'libuv-win-process-no-extra-stdio'
a590382850 libuv: win/spawn: disable extra-file-descriptor support not needed by CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9541
2024-05-28 08:56:41 -04:00
Brad King
49c7a718de Merge topic 'libuv-win-process-no-extra-stdio' into release-3.28
a590382850 libuv: win/spawn: disable extra-file-descriptor support not needed by CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9541
2024-05-28 08:56:07 -04:00
Brad King
3242f4cffc Merge topic 'cuda-vs-17.10' into release-3.29
69f26d8156 VS: Fix compiler identification of nvcc with unsupported host compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9546
2024-05-24 10:35:50 -04:00
Brad King
fa8c04b421 Tests/RunCMake/execute_process: Check STARTUPINFOW reserved members
Verify that `execute_process` launches processes on Windows such that
`GetStartupInfoW` in the child does not populate `STARTUPINFOW` members
reserved for the MSVC C run-time.

Issue: #25996
2024-05-24 10:12:27 -04:00
Brad King
69f26d8156 VS: Fix compiler identification of nvcc with unsupported host compiler
`nvcc` from CUDA < 12.4 does support the MSVC 14.40.17.10 toolset.
Users may specify `CUDAFLAGS=-allow-unsupported-compiler` to bypass the
check.  However, we do not use arbitrary user-specified flags during
compiler identification in the VS generator because escaping them for
the `AdditionalOptions` of the `.vcxproj` file requires non-trivial
logic that we currently only implement in the C++ generator code.
Instead, just always pass `-allow-unsupported-compiler` during CUDA
compiler identification in the VS generator.

Fixes: #26003
2024-05-23 13:22:34 -04:00
Brad King
d98df689ab Merge branch 'libuv-win-process-no-extra-stdio' 2024-05-22 14:58:43 -04:00
Brad King
a590382850 libuv: win/spawn: disable extra-file-descriptor support not needed by CMake
Upstream libuv supports passing file descriptors >= 3 to child processes
via `STARTUPINFOW` members reserved by the MSVC C run-time.  However,
some programs use `GetStartupInfoW` to initialize a `STARTUPINFOW`
structure to pass to `CreateProcessW` without clearing the reserved
members.  If we launch such programs with non-zero values in the
reserved members, the MSVC C run-time in *their* children may not
correctly associate the stdin/stdout/stderr streams' file descriptors
with the corresponding `HANDLE`s.

Patch our copy of libuv to avoid using the reserved members.  This
restores `execute_process` support for the above-described programs as
we had prior to commit 5420639a8d (cmExecuteProcessCommand: Replace
cmsysProcess with cmUVProcessChain, 2023-06-01, v3.28.0-rc1~138^2~8).
It also enables support for such programs when launched by `ctest`.

Fixes: #25996
Fixes: #25889
2024-05-22 14:58:06 -04:00
Brad King
cbe26bdeda Merge branch 'release-3.28' into release-3.29 2024-05-17 11:16:54 -04:00
Brad King
ea44e63a7c Merge topic 'cxxmodules-gcc-binary-mode' into release-3.29
9e2f31ec23 cmCxxModuleMapper: add a query for the open mode for the modmap

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9525
2024-05-17 11:16:16 -04:00
Brad King
32a8d5a4ac Merge topic 'cxxmodules-gcc-binary-mode' into release-3.28
9e2f31ec23 cmCxxModuleMapper: add a query for the open mode for the modmap

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9525
2024-05-17 11:15:38 -04:00
Ben Boeckel
9e2f31ec23 cmCxxModuleMapper: add a query for the open mode for the modmap
GCC (MinGW) wants to use `\n` on Windows too.

Fixes: #25974
2024-05-16 09:54:16 -04:00
Brad King
050bba06c1 Merge branch 'release-3.28' into release-3.29 2024-05-15 10:00:31 -04:00
Brad King
19c2f8e1f3 Merge topic 'cmp0037-message' into release-3.29
c773d5b436 CMP0037: Restore diagnostic message for invalid ALIAS target names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9519
2024-05-15 09:58:48 -04:00
Brad King
20b63a87ed Merge topic 'cmp0037-message' into release-3.28
c773d5b436 CMP0037: Restore diagnostic message for invalid ALIAS target names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9519
2024-05-15 09:58:17 -04:00
Brad King
c773d5b436 CMP0037: Restore diagnostic message for invalid ALIAS target names
Refactoring in commit 7a4c02cb38 (cmGlobalGenerator: factor out
messaging for CMP0037, 2023-09-24, v3.28.0-rc1~39^2~7) incorrectly
switched to reporting the aliased target name instead of the invalid
name of the alias itself.

Fixes: #25979
2024-05-14 10:44:47 -04:00
Brad King
b3958a0a5a Merge branch 'release-3.28' into release-3.29 2024-05-14 10:27:23 -04:00
Brad King
9813b9f0ad Merge topic 'ExternalProject-xcode-effective-platform' into release-3.29
0a3caf0878 ExternalProject: Restore support for Xcode with an effective platform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9517
2024-05-14 10:26:46 -04:00
Brad King
065729b6d1 Merge topic 'ExternalProject-xcode-effective-platform' into release-3.28
0a3caf0878 ExternalProject: Restore support for Xcode with an effective platform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9517
2024-05-14 10:26:01 -04:00