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

CMake >3.20 warns on missing policy #333

Open
alexanderbock opened this issue Jul 19, 2022 · 2 comments
Open

CMake >3.20 warns on missing policy #333

alexanderbock opened this issue Jul 19, 2022 · 2 comments

Comments

@alexanderbock
Copy link

alexanderbock commented Jul 19, 2022

CMake Warning (dev) at ext/glbinding/CMakeLists.txt:47 (include):
  Policy CMP0120 is not set: The WriteCompilerDetectionHeader module is
  removed.  Run "cmake --help-policy CMP0120" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

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

Calling set_policy(CMP0120 NEW) in the root CMakelists.txt results in:

CMake Error at ext/glbinding/source/glbinding-aux/CMakeLists.txt:179 (file):
  file COPY cannot find
  "A:/<proj>/ext/glbinding/source/codegeneration/glbinding-aux_features.h":
  No such file or directory.
@scheibel
Copy link
Member

Thanks for reporting.
I had a quick look at the policy CMP0120 and conclude that the NEW behavior effectively breaks the build, as you report, too.
In fact, our use case of this features header is now deprecated and discouraged for use by CMake.

The short-term approach will be to set the policy to OLD and migrate glbinding and our other projects to other dependencies to replace this features header.

@nigels-com
Copy link

Bumped into this trying to bump cmake_minimum_required(VERSION 3.21)

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

No branches or pull requests

3 participants