Skip to content

cmake deprecation warning - policy CMP0076 #351

@vincer2040

Description

@vincer2040

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions