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: add missing version detection to Find modules #14548

Closed
wants to merge 39 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Aug 14, 2024

  • use pkg-config version when available and where it wasn't yet used.

  • add manual version detection for dependencies where this is possible
    (via a public header) and where it wasn't done yet.


@vszakats vszakats added the cmake label Aug 14, 2024
@github-actions github-actions bot added the CI Continuous Integration label Aug 14, 2024
@vszakats vszakats changed the title cmake: add version detection where missing cmake: add version detection where missing in Find modules Aug 14, 2024
@vszakats vszakats changed the title cmake: add version detection where missing in Find modules cmake: add missing version detection to Find modules Aug 14, 2024
@github-actions github-actions bot added the build label Aug 15, 2024
@vszakats vszakats closed this in 4e2f364 Aug 16, 2024
@vszakats vszakats deleted the cm-find-verdetect branch August 16, 2024 14:54
vszakats added a commit that referenced this pull request Aug 16, 2024
vszakats added a commit that referenced this pull request Aug 17, 2024
- use the same pattern across all Find modules:
  - verify if the version header exists before reading it.
  - use a single regex per lookup.
  - sync regexes between Find modules.
  - use generic temporary variable names.
  - improve readability.
  - make it simpler to transition to new CMake syntax in the future:
    ```cmake
    file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str REGEX "<...>")
    unset(_version_str)
    set(CARES_VERSION "${CMAKE_MATCH_1}")
    ```
    Ref: https://cmake.org/cmake/help/latest/policy/CMP0159.html#policy:CMP0159

- fix zstd version detection to be CMake 3.7 compatible.
  Required 3.9 before this patch, for the `CMAKE_MATCH_<n>` feature.
  Follow-up to c5d506e #12200

Follow-up to 4e2f364 #14548

Closes #14572
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build CI Continuous Integration cmake
Development

Successfully merging this pull request may close these issues.

1 participant