Skip to content

cmake: more syntax tidy-up#14388

Closed
vszakats wants to merge 54 commits intocurl:masterfrom
vszakats:cm-tidyup-more
Closed

cmake: more syntax tidy-up#14388
vszakats wants to merge 54 commits intocurl:masterfrom
vszakats:cm-tidyup-more

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Aug 4, 2024

  • quote string literals.
    In the hope it improves syntax-highlighting and readability.

  • use lowercase, underscore-prefixed local var names.
    As a hint for scope, to help readability.

  • prefer pkg_search_module (over pkg_check_modules).
    They are the same, but pkg_search_module stops searching
    at the first hit.

  • more IN LISTS in foreach().

  • OtherTests.cmake: clear CMAKE_EXTRA_INCLUDE_FILES after use.

  • add PROJECT_LABEL for http/client and unit test targets.

  • sync Find* module comments and formatting.

  • drop a few local variables.

  • drop bogus CARES_LIBRARIES from comment.

  • unquote numeric literal.

Follow-up to acbc6b7 #14197
Closes #14388

@vszakats vszakats force-pushed the cm-tidyup-more branch 2 times, most recently from 9de0d76 to 1d4ca74 Compare August 7, 2024 19:53
@vszakats vszakats closed this in c2889a7 Aug 7, 2024
@vszakats vszakats deleted the cm-tidyup-more branch August 7, 2024 21:44
vszakats added a commit to vszakats/curl that referenced this pull request Aug 16, 2024
`pkg_check_modules()` logs a line when there is a hit, and also warnings
if a sub-dependency is missing. In `QUIET` mode, both are completely
silent.

The extra info is useful to see if a detection happened via
`pkg-config`.

Keep `pkg_search_module()` in `FindGSS`. We pass two dependencies
there and we want to keep stopping on the first one.

Partially reverts c2889a7 curl#14388
vszakats added a commit that referenced this pull request Aug 16, 2024
Prefer `pkg_check_modules()` over `pkg_search_module()`.

`pkg_check_modules()` logs a line when there is a hit, and also warnings
if a sub-dependency is missing. In `QUIET` mode, both are silent.

The extra info is useful to see if a detection happened via
`pkg-config`.

Keep `pkg_search_module()` in `FindGSS`. We pass two dependencies
there and we want to keep stopping on the first one.

Partially reverts c2889a7 #14388

Closes #14573
vszakats added a commit to vszakats/curl that referenced this pull request Sep 4, 2024
vszakats added a commit that referenced this pull request Sep 4, 2024
They were renamed recently as internal variables, but they are both
cached, so let's keep the original names for consistency and
compatibility.

Partial revert of c2889a7 #14388
Tested via #14778
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