Skip to content

cmake: minor tidy-ups#14610

Closed
vszakats wants to merge 22 commits intocurl:masterfrom
vszakats:cm-syntax-tidyup
Closed

cmake: minor tidy-ups#14610
vszakats wants to merge 22 commits intocurl:masterfrom
vszakats:cm-syntax-tidyup

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Aug 19, 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 cmake: sync code between test/example targets #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 cmake: tidy-ups #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.

@vszakats vszakats added the cmake label Aug 19, 2024
@github-actions github-actions bot added the build label Aug 19, 2024
@vszakats vszakats changed the title cmake: hopefully final touchups cmake: hopefully final touch-ups Aug 19, 2024
@vszakats vszakats marked this pull request as draft August 20, 2024 09:54
@vszakats vszakats force-pushed the cm-syntax-tidyup branch 3 times, most recently from 4aada7f to 7c51a6f Compare August 21, 2024 16:16
@github-actions github-actions bot added the tests label Aug 22, 2024
@vszakats vszakats force-pushed the cm-syntax-tidyup branch 3 times, most recently from 8e367b8 to 820e5ac Compare August 22, 2024 19:59
vszakats added a commit that referenced this pull request Aug 22, 2024
@vszakats vszakats marked this pull request as ready for review August 23, 2024 18:55
@vszakats vszakats changed the title cmake: hopefully final touch-ups cmake: minor tidy-ups Aug 23, 2024
Without status the output goes to stderr, and goes red in CMake GUI.
This was not intended, the goal was to align these lines exactly with
the curl -V output to make it easy to compare visually. This doesn't
seem doable with CMake.

Partial revert of acbc6b7 curl#14197
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 closed this in 8b09138 Aug 26, 2024
@vszakats vszakats deleted the cm-syntax-tidyup branch August 26, 2024 09:11
vszakats added a commit that referenced this pull request Dec 16, 2024
Also add cleanup `unset()`s where missing.

Reported-by: Kai Pastor
Bug: #15255 (comment)
Follow-up to 8b09138 #14610

Closes #15497
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
Also add cleanup `unset()`s where missing.

Reported-by: Kai Pastor
Bug: curl#15255 (comment)
Follow-up to 8b09138 curl#14610

Closes curl#15497
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