Skip to content

cmake: defer building unitprotos.h till a test target needs it#18086

Closed
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:cm-unitproto-opt
Closed

cmake: defer building unitprotos.h till a test target needs it#18086
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:cm-unitproto-opt

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented Jul 29, 2025

Follow-up to c9bb9cd #17750
Ref: #17750 (comment)

@github-actions github-actions bot added the build label Jul 29, 2025
@vszakats vszakats changed the title cmake: defer building unitprotos.h till a target needs it cmake: defer building unitprotos.h till a test target needs it Jul 29, 2025
@vszakats vszakats added the tests label Jul 29, 2025
Comment thread lib/CMakeLists.txt
@vszakats vszakats closed this in daa5b04 Jul 30, 2025
@vszakats vszakats deleted the cm-unitproto-opt branch July 30, 2025 00:40
jhauga added a commit to jhauga/curl that referenced this pull request Jul 30, 2025
* tests: merge clients into libtests, drop duplicate code

libtests and clients were built the same way after recent overhauls.
libtests are used by runtests, clients by pytests.

Merge clients into libtests, aligning their entry function signature,
dropping common utility functions, and simplifying the build.

Note: After this patch `CURLDEBUG` applies to cli tests, when enabled.

Also:
- lib552: drop local copy-paste debug callback in favor of testtrace.
- lib552: drop local copy-paste dump function in favor of testtrace.
- clients: use `long` for HTTP version, drop casts.
- clients: replace local dump function in favor of testrace clone.
- sync cli test entry function prototype with libtests'.
- h2_serverpush: replace local trace callback with testtrace.
- de-duplicate 3 websocket close, ping, ping, functions. Kept the pong
  iteration from `ws_pingpong`. Note: the pong clone in `lib2304` was
  returning an error when `curl_ws_recv()` returned non-zero and
  the payload matched the expected one anyway. After this patch, this
  case returns success, as it does in `ws_pingpong`.
  `lib2304` keeps passing, but I'm not sure if the previous behavior
  was intentional.
- display full value in websocket close, ping, pong, drop casts.

Closes curl#18079

* cmake: defer building `unitprotos.h` till a test target needs it

Follow-up to c9bb9cd curl#17750
Ref: curl#17750 (comment)
Closes curl#18086

* curl: add -h cheat-sheet using curl-cheat-sheet as text

Resolve failing checks.

---------

Co-authored-by: Viktor Szakats <commit@vsz.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants