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

Warnings when using blt in cmake projects that use a new style project command #46

Closed
cyrush opened this issue Jul 13, 2017 · 2 comments · Fixed by #48
Closed

Warnings when using blt in cmake projects that use a new style project command #46

cyrush opened this issue Jul 13, 2017 · 2 comments · Fixed by #48
Assignees

Comments

@cyrush
Copy link
Member

cyrush commented Jul 13, 2017

When you add a project using this style of project command:

project(project_name VERSION "x.y.z")

Our google test and google mock sub projects trigger the following warnings

CMake Warning (dev) at blt/thirdparty_builtin/googletest-release-1.8.0/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:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.
@davidbeckingsale
Copy link
Member

We can update the project commands in those files, but would that complain when people use the old style project command?

@cyrush
Copy link
Member Author

cyrush commented Jul 14, 2017

Thankfully, it turns out there is a simple fix:

https://github.com/google/googletest/pull/782/files

(this PR hasn't been pulled into google test yet)

I was trying to add the policy commands in the wrong places (I missed the top level project)

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 a pull request may close this issue.

2 participants