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

[AVRO-3944] small CMake fixes #2757

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Conversation

mkmkme
Copy link
Contributor

@mkmkme mkmkme commented Feb 20, 2024

  • Bump the minimal supported cmake version to fix the warning
  • Fix the always-true if statement in CMake

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Documentation

  • Does this pull request introduce a new feature? no

Current version triggers a warning during configuration phase:

  CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

CMake 3.5.0 has been released in 2016, so it's safe to assume it's
available everywhere, which correlates with the information from
pkgs.org [1].

[1]: https://pkgs.org/search/?q=cmake&on=name
The if-statement was always true since minimum cmake version was set to
3.1.
Instead, replace this condition with `if (APPLE)` since this policy
makes sense only on macOS.
@github-actions github-actions bot added the C++ Pull Requests for C++ binding label Feb 20, 2024
@martin-g martin-g merged commit 3aec6f4 into apache:main Feb 21, 2024
4 checks passed
martin-g pushed a commit that referenced this pull request Feb 21, 2024
* Bump cmake_minimum_required to 3.5.

Current version triggers a warning during configuration phase:

  CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

CMake 3.5.0 has been released in 2016, so it's safe to assume it's
available everywhere, which correlates with the information from
pkgs.org [1].

[1]: https://pkgs.org/search/?q=cmake&on=name

* CMake: fix the setting CMP0042 policy

The if-statement was always true since minimum cmake version was set to
3.1.
Instead, replace this condition with `if (APPLE)` since this policy
makes sense only on macOS.

(cherry picked from commit 3aec6f4)
@mkmkme mkmkme deleted the mkmkme/small-cmake-fixes branch February 21, 2024 14:07
RanbirK pushed a commit to RanbirK/avro that referenced this pull request May 13, 2024
* Bump cmake_minimum_required to 3.5.

Current version triggers a warning during configuration phase:

  CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.

CMake 3.5.0 has been released in 2016, so it's safe to assume it's
available everywhere, which correlates with the information from
pkgs.org [1].

[1]: https://pkgs.org/search/?q=cmake&on=name

* CMake: fix the setting CMP0042 policy

The if-statement was always true since minimum cmake version was set to
3.1.
Instead, replace this condition with `if (APPLE)` since this policy
makes sense only on macOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ Pull Requests for C++ binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants