1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-13 22:30:25 +08:00

28 Commits

Author SHA1 Message Date
Brad King
a67d9b5c07 Merge topic 'libuv-1.48'
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:46 -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
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
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
Brad King
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
It is commonly called with the `fileno()` of a `FILE*` stream,
so accept the latter directly.
2024-01-24 16:59:49 -05:00
Brad King
116bb2b70f cmUVProcessChain: Simplify builder initialization 2024-01-24 16:59:49 -05:00
Kyle Edwards
0b043a75b7 cmUVProcessChain: Add option for external uv_loop_t 2023-12-05 14:48:24 -05:00
Brad King
241ee252ce IWYU: Update for Debian 12 CI job
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library.  Update includes
to satisfy IWYU for our CI job under Debian 12.
2023-07-28 09:14:08 -04:00
Kyle Edwards
830a4b37aa cmUVProcessChain::Wait(): Treat timeout of 0 as no timeout 2023-07-26 13:08:27 -04:00
Kyle Edwards
b8fd273ed7 cmUVProcessChain: Return output and error streams as file descriptors 2023-06-14 11:53:55 -04:00
Kyle Edwards
e329704546 cmUVProcessChain: Add support for SetExternalStream(Stream_INPUT) 2023-06-12 10:34:04 -04:00
Kyle Edwards
891b60d691 cmUVProcessChain: Add Status::SpawnResult field 2023-06-08 14:56:27 -04:00
Kyle Edwards
5be0cd9f3c cmUVProcessChain: Manually create pipes between processes
Previously, we were letting libuv create the output pipe for each
process. However, in order to facilitate use cases where process
spawn is expected to fail (in the case of a missing executable), we
want pipe creation to be separate from process creation. Manually
create all of the pipes.
2023-06-08 14:56:27 -04:00
Kyle Edwards
bb5ec5c9b4 cmUVProcessChain: Do some internal refactoring
Move most of cmUVProcessChain::InternalData::Finish() to Prepare()
so that error codes can be checked before attepting to spawn any
processes. Check some error codes that weren't being checked before.
Change return type of Finish() to void as it can't fail.
2023-06-08 14:56:26 -04:00
Kyle Edwards
154fe00ca5 cmUVProcessChain: Add Status::GetException() method 2023-06-05 11:27:45 -04:00
Kyle Edwards
22e5775cde cmUVProcessChain: Add Finished() method 2023-05-31 17:21:52 -04:00
Kyle Edwards
ec80090ce3 cmUVProcessChain: Add option for merged output and error 2023-05-26 15:52:01 -04:00
Kyle Edwards
67bb1ee50c cmUVProcessChain: Add working directory option 2023-05-26 11:25:32 -04:00
Rose
6d15754814 Make vector operations more efficient 2022-12-10 12:48:09 -05:00
Marc Chevrier
2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
Fixes: #20666
2020-05-07 12:06:08 +02:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Marc Chevrier
c688b401d3 cmstd: Modernize CMake system headers
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones.  For example:

    #include <cm/string_view>

can be used safely for CMake development in place of the `<string_view>`
standard header.

Fixes: #19491
2019-09-20 10:01:37 -04:00
Regina Pfeifer
f30523d090 clang-tidy: modernize-deprecated-headers 2019-09-16 10:11:13 -04:00
Marc Chevrier
1591f138f1 modernize: manage cmCommand instances using unique_ptr. 2019-07-14 15:37:30 +02:00
Marc Chevrier
d9b2c7dae2 Introduce memory management helper: cm_memory.hxx 2019-07-14 15:37:30 +02:00
Kyle Edwards
dfa24355ea cmUVProcessChain: Add assert() for static analysis tools
Some static analysis tools throw a false positive for an
out-of-bounds item that is being dereferenced. This out-of-bounds
error will never actually happen because of how
cmUVProcessChain::InternalData::AddCommand() is being called.
Nevertheless, this change adds an assert() to help static analysis
tools be absolutely certain that the referenced item is within the
vector's bounds.

This change also changes the item access to use an index rather
than an iterator.
2019-05-14 14:00:13 -04:00
Kyle Edwards
26025d6e10 cmUVProcessChain: Add cmUVProcessChain
This class is ultimately intended as a replacement for cmsys::Process.
It spawns a series of processes using libuv, piping the output of each
command into the next.

Note: input support has not yet been implemented because write
support has not yet been implemented on cmUVStreambuf.
2019-05-07 13:40:06 -04:00