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

Bump cmake version to 3.0 and use new version syntax #587

Merged
merged 3 commits into from
Oct 22, 2021

Conversation

jarulsamy
Copy link
Contributor

Currently, CMake outputs a deprecation warning each time a build is initialized:

CMake Deprecation Warning at build/_deps/cjson-src/CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 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.

When this library is used with cmakes fetch_upstream feature some additional errors are displayed as well due to how versioning is handled between 2.x.x and 3.0+:

CMake Warning (dev) at build/_deps/cjson-src/CMakeLists.txt:4 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
This warning is for project developers.  Use -Wno-dev to suppress it.

This PR bumps the Cmake version to 3.0, and switches to the new versioning syntax, and thus eliminates these warnings.

If for any reason we are specifically keeping support for Cmake 2.x it is perfectly acceptable to not merge this PR.

@Alanscut Alanscut merged commit c77a688 into DaveGamble:master Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants