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

[build] Fixed CMake CMP0048 policy restriction #1765

Merged
merged 3 commits into from
Jan 29, 2021

Conversation

maxsharabayko
Copy link
Collaborator

@maxsharabayko maxsharabayko commented Jan 27, 2021

CMake version 3.0 introduced the VERSION option of the project() command to specify a project version as well as the name.
CMake version 3.19.3 warns when the policy is not set and uses OLD behavior.
See CMP0048.

CMake Warning (dev) at CMakeLists.txt:15 (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:

    CMAKE_PROJECT_VERSION
    CMAKE_PROJECT_VERSION_MAJOR
    CMAKE_PROJECT_VERSION_MINOR
    CMAKE_PROJECT_VERSION_PATCH

This PR uses the new policy for CMake Versions above 3.0.

@maxsharabayko maxsharabayko added Type: Maintenance Work required to maintain or clean up the code [build] Area: Changes in build files labels Jan 27, 2021
@maxsharabayko maxsharabayko added this to the v1.4.3 milestone Jan 27, 2021
CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Collaborator

@ethouris ethouris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider ^

@maxsharabayko maxsharabayko merged commit 0d0888a into Haivision:master Jan 29, 2021
@maxsharabayko maxsharabayko deleted the hotfix/cmake-CMP0048 branch January 29, 2021 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[build] Area: Changes in build files Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants