Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: sync code between test/example targets #14660

Closed
wants to merge 12 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Aug 23, 2024

  • reuse local variable names.
  • sync PROJECT_LABEL, add where missing.
  • namespace all target names.
  • bind header directories to each target.
  • tests/server: limit CURL_STATICLIB to Windows (as in autotools.)
  • drop functions with a single caller.

w/o whitespace: https://github.com/curl/curl/pull/14660/files?w=1

@vszakats vszakats closed this in a2ef5d3 Aug 23, 2024
@vszakats vszakats deleted the cm-reuse-internal-varnames branch August 23, 2024 16:44
vszakats added a commit to vszakats/curl that referenced this pull request Aug 25, 2024
Leave the logic there to keep code in sync between tests.

They inflated the generated make code by 600KB.
(seen with GNU Makefiles)

Ref: a2ef5d3 curl#14660
@vszakats vszakats mentioned this pull request Aug 25, 2024
vszakats added a commit that referenced this pull request Aug 26, 2024
- show `OpenSSL v3+` when detected (as in `./configure`).
  (this string also makes its way to `curl-config`.)
- prefer `unset(VAR)` over `set(VAR)`.
  Same effect, but `unset()` tells the intent unambiguously.
  https://cmake.org/cmake/help/latest/command/set.html
- drop "implementation" from an `option()` description.
- FindGSS: replace legacy keyword alias with modern alternative.
  https://cmake.org/cmake/help/latest/command/get_filename_component.html
- move `CURL_STATIC_CRT` logic next to its `option()`.
- improve order of `libcurl.pc`/`curl-config` variable init lines.
- tests: drop/shorten custom target names.
  They inflated generated make files by 550KB.
  Keep target name logic for sync between code snippets.
  Follow-up to a2ef5d3 #14660
- clear a variable after use.
- restore `STATUS` for `Features:`/`Protocols:` `message()`s:
  Without it the output goes to stderr, and appears in red in CMake GUI.
  It doesn't seem possible to show a line on stdout without leading
  underscores to match `curl -V` and `./configure` output.
  Partial revert of acbc6b7 #14197
- WindowsCache: move `HAVE_LINUX_TCP_H` into the header group.
- move strings to the same line as their `STRING` keyword.
- formatting in generated code.
- delete bogus comment.
- unfold lines for readability.
- fix a too long line. (for cmakelint)
- missing quotes, whitespace, comments.

Closes #14610
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.

1 participant