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

Suppress cmake policy CMP0048 warning when building with cmake 3.x #93

Merged
merged 1 commit into from
Nov 11, 2019
Merged

Suppress cmake policy CMP0048 warning when building with cmake 3.x #93

merged 1 commit into from
Nov 11, 2019

Conversation

simonrepp
Copy link
Contributor

I am building with cmake 3.13.4 and getting the following warning during running cmake:

CMake Warning (dev) at CMakeLists.txt:3 (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 warning is for project developers.  Use -Wno-dev to suppress it.

According to my understanding and research this refers to a feature that is not used in this project (also the somewhat related custom OMMPFRITT_VERSION_MAJOR etc. variables as far as I can see don't get used currently). By setting the policy to NEW explicitly (as done in the PR) everyone who builds themselves is not getting the abovementioned and possibly confusing warning. Some empty variables (PROJECT_VERSION_... etc.) are set due to this change but this should have to my understanding no consequences and in any case will be the default behavior in the future.

@simonrepp
Copy link
Contributor Author

For reference, I researched this (among other sources) here:

@pasbi
Copy link
Owner

pasbi commented Nov 11, 2019

I was annoyed by this warning for so long already, thanks for looking into this!
I don't really understand what's going on here but I guess you know what you do...

@pasbi pasbi closed this Nov 11, 2019
@pasbi pasbi reopened this Nov 11, 2019
@pasbi pasbi merged commit edd7dc9 into pasbi:master Nov 11, 2019
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