libcheck / check

A unit testing framework for C
GNU Lesser General Public License v2.1
1.08k stars 209 forks source link

cmake deprecation warning - policy CMP0076 #351

Open vincer2040 opened 11 months ago

vincer2040 commented 11 months ago

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.