Commit Graph

268 Commits

Author SHA1 Message Date
Vito Gamberini
5fc2bad167 cmArgumentParser: Support binding with derived classes 2024-07-02 09:58:57 -04:00
Kyle Edwards
93e471f371 Tests: Build testUVProcessChainHelper with WIN32_LEAN_AND_MEAN 2024-02-27 14:36:40 -05:00
Christoph Grüninger
01c22dfaee Range-for loop with const reference
Prevent copy-ctor and dtor to be called.
Found by Cppcheck (constVariableReference)
2024-02-14 20:46:02 +01: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
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
d32c30906a Tests: Add missing include in testUVProcessChainHelper on Windows
We use `STATUS_ACCESS_VIOLATION` from `windows.h`.
2024-01-24 16:59:23 -05:00
Kyle Edwards
0b043a75b7 cmUVProcessChain: Add option for external uv_loop_t 2023-12-05 14:48:24 -05:00
Brad King
5396f4a9a3 cmUVJobServerClient: Add libuv-based job server integration client 2023-12-03 08:30:06 -05:00
Brad King
47fbb29ad7 cmUVHandlePtr: Fix conversion to bool on Oracle Studio compiler
The operator added by commit 17690558c3 (cmUVHandlePtr: Add explicit
conversion to bool, 2023-10-26) works in direct expressions like
`if(foo)` but not compound expressions like `if(foo && ...)`.
Drop the `explicit` mark when compiling with Oracle Studio so we
can at least compile valid code.
2023-12-02 06:37:40 -05:00
Brad King
7ee5fb01c6 cmUVHandlePtr: Add uv_write wrapper to manage request lifetime
Provide a way to synchronously cancel a write request callback.
2023-11-22 07:12:38 -05:00
Brad King
fb7ee82271 cmUVHandlePtr: Add uv_idle_ptr::{start,stop} methods
These were missing w.r.t. the pattern established for other handle wrappers.
2023-11-20 18:22:53 -05:00
Brad King
9dd14b2946 cmUVHandlePtr: Add uv_timer_ptr::stop method
This was missing w.r.t. the pattern established for other handle wrappers.
2023-11-20 18:22:30 -05:00
Brad King
8908f277d9 Tests: Add dedicated test case for uv_timer_ptr 2023-11-20 18:22:09 -05:00
Brad King
f906e2482f Tests: Factor out callback in uv_idle_ptr test case 2023-11-20 18:22:03 -05:00
Brad King
89435a5662 Tests: Add dedicated test to cover cmUVHandlePtr types
Move the case added by commit 70d88a5361 (cmUVHandlePtr: Add
uv_idle_ptr, 2023-11-06) to a dedicated test.
2023-11-20 18:21:46 -05:00
Brad King
70d88a5361 cmUVHandlePtr: Add uv_idle_ptr
Wrap a `uv_idle_t` handle.
2023-11-17 08:51:25 -05:00
Brad King
17690558c3 cmUVHandlePtr: Add explicit conversion to bool 2023-11-17 08:50:53 -05:00
Brad King
85a9fe056f Merge topic 'cxx23'
a0fabc4769 cmGlobalGeneratorFactory: Provide complete cmGlobalGenerator to deleter
85627a93c9 cmCTestBuildCommand: Avoid requiring complete cmGlobalGenerator type publicly
641c02a3ce cmList: Avoid using operator-> on input iterator
e4483b8871 Tests: Avoid compiling call to dap::optional<dap::string>(nullptr)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8950
2023-11-08 10:32:04 -05:00
Brad King
e4483b8871 Tests: Avoid compiling call to dap::optional<dap::string>(nullptr) 2023-11-07 09:13:24 -05:00
Brad King
9627ef86c9 Merge topic 'debugger-function-name-in-stacktrace'
c028425df9 Debugger: report function name in DAP stackframes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8913
2023-10-27 09:04:06 -04:00
Dmitry.Neverov
c028425df9 Debugger: report function name in DAP stackframes
Before a file name and a line were returned, but they can be
obtained by other means.

Fixes: #25091
2023-10-26 09:51:32 -04:00
Brad King
264dcae5e4 Tests: Fix clang -Wstrict-prototypes warnings 2023-10-26 09:20:45 -04:00
Ben Boeckel
b0612796b1 cmDebugTools: add header
This provides a utility macro which prints out:

- location of the call;
- the expression being evaluated; and
- the value of the expression.

Evaluates to the value of the expression.

Inspired by Rust's `dbg!` macro.

See: https://doc.rust-lang.org/stable/std/macro.dbg.html
2023-10-01 06:52:44 -04:00
Kyle Edwards
49a37d5a97 cmCTestScriptHandler: Replace cmsysProcess with cmUVProcessChain
And update cmSystemTools::WaitForLine() to use cmUVProcessChain.
2023-08-29 10:51:30 -04:00
Kyle Edwards
27be5ccd45 cmUVStreamRead: Return RAII handle to avoid memory leak 2023-08-25 10:44:06 -04:00
Kyle Edwards
439722993e CMakeLibTests: Compile with WIN32_LEAN_AND_MEAN 2023-08-21 14:48:07 -04:00
Brad King
df0a32f48e Merge topic 'debugger-pipe-connections'
8b1257e7bf Debugger: Replace libuv with platform-specific connection code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8711
2023-08-19 08:46:01 -04:00
Paul Maybee
8b1257e7bf Debugger: Replace libuv with platform-specific connection code
Remove libuv usage from CMake debugger. Libuv has an async io model
and cppdap uses a sync model, so an extra thread and a buffer copy
were necessary to match semantics. In order to eliminate those
costs this commit implements the IO using platform specific APIs.
2023-08-17 10:11:33 -04:00
Brad King
5a7f30e532 Merge topic 'test-debugger-named-pipe-fix'
1a5cb0c1c1 testDebuggerNamedPipe: fix for cppdap with nlohmann_json

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8725
2023-08-16 13:31:57 -04:00
Đoàn Trần Công Danh
1a5cb0c1c1 testDebuggerNamedPipe: fix for cppdap with nlohmann_json
Fixes: #25190
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2023-08-16 10:24:08 -04:00
Brad King
5ed03aa07a Merge topic 'add-cm-fileno'
fbdb1fd843 Source: Add cm_fileno wrapper

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8686
2023-08-09 11:36:07 -04:00
Kyle Edwards
fbdb1fd843 Source: Add cm_fileno wrapper
And use it where appropriate.
2023-08-07 11:26:05 -04:00
Marc Chevrier
a9a34edc82 cmList: Fix performance regression in append/prepend
Fixes: #25147
2023-08-04 09:55:47 +02:00
Marc Chevrier
7f9f96151a cmList: Fix performance regression in append/prepend
Fixes: #25147
2023-08-04 09:52:08 +02:00
Brad King
d56b0f9339 Merge topic 'test_utf8_improve'
3ce4e9523c testUTF8: Improve using string_view

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8673
2023-08-01 09:29:09 -04:00
Vitaly Stakhovsky
3ce4e9523c testUTF8: Improve using string_view 2023-07-30 15:55:39 -04: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
Marc Chevrier
945b9b8132 cmCMakePath: workarounds for Sunpro/sparc compiler 2023-07-18 11:50:07 -04:00
Brad King
c9b1ce71f6 Merge topic 'debugger-breakpoints'
60b6383993 Debugger: Always clear existing breakpoints on setBreakpoints

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8624
2023-07-14 08:34:30 -04:00
Ben McMorran
60b6383993 Debugger: Always clear existing breakpoints on setBreakpoints
Fixes: #25063
2023-07-13 08:44:52 -04:00
Brad King
dab61cf1aa Merge topic 'debugger-no-supportsVariableType'
e02cf3f190 Debugger: Correctly handle clients without supportsVariableType

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Garrett Campbell <gcampbell@microsoft.com>
Merge-request: !8620
2023-07-13 08:36:25 -04:00
Ben McMorran
e02cf3f190 Debugger: Correctly handle clients without supportsVariableType
Fixes: #25057
2023-07-12 10:09:21 -04:00
Brad King
d2a28d185a Tests: Improve order of CMakeLibTests link libraries
Avoid repeating `libCMakeLib.a` multiple times on the link line.
2023-07-07 10:23:31 -04:00
Brad King
7417495de5 Merge topic 'debugger-segfault'
764258771a Debugger: Fix threads request segfault after thread exited event

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8604
2023-06-30 09:30:21 -04:00
Ben McMorran
764258771a Debugger: Fix threads request segfault after thread exited event
Fixes: #25041
2023-06-29 13:25:51 -04:00
Clemens Wasser
90dec6e9cc CMakeLibTests: Precompile common expensive headers 2023-06-22 18:11:45 +02:00
Kyle Edwards
0878306386 cmUVStream: Add cmUVStreamRead() function 2023-06-14 11:53:55 -04:00
Kyle Edwards
b8fd273ed7 cmUVProcessChain: Return output and error streams as file descriptors 2023-06-14 11:53:55 -04:00
Kyle Edwards
ec81d40be4 cmUVPipeIStream: Add cmUVPipeIStream 2023-06-14 11:53:55 -04:00