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 deprecation warning - policy CMP0076 #351

Open
vincer2040 opened this issue Dec 23, 2023 · 0 comments
Open

cmake deprecation warning - policy CMP0076 #351

vincer2040 opened this issue Dec 23, 2023 · 0 comments

Comments

@vincer2040
Copy link

on line 42 of CMakeLists.txt, CMP0076 is set to OLD:

if(POLICY CMP0076)
  # target_sources() leaves relative source file paths unmodified. (OLD)
  cmake_policy(SET CMP0076 OLD)
endif()

Because of this, I get this warning from cmake:

CMake Deprecation Warning at build/_deps/libcheck-src/CMakeLists.txt:42 (cmake_policy):
  The OLD behavior for policy CMP0076 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

according to cmake docs on CMP0076 (link):

Note The OLD behavior of a policy is deprecated by definition and may be removed in a future version of CMake.

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

1 participant