libpcap icon indicating copy to clipboard operation
libpcap copied to clipboard

CMake (version 3.22.1) Deprecation Warning

Open fxlb opened this issue 3 years ago • 1 comments

CMake Deprecation Warning at CMakeLists.txt:16 (cmake_policy):
  The OLD behavior for policy CMP0042 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.

fxlb avatar Feb 22 '22 08:02 fxlb

Policy CMP0042 affects macOS; I'll have to see what else would have to change, if anything, and what side effects it would have.

guyharris avatar Mar 03 '22 02:03 guyharris

There is a fix proposal in this PR: #1111.

fxlb avatar Nov 27 '22 08:11 fxlb

See also 16e1e243a9e9f03d8e8f4ee1067ba46795439a8d.

guyharris avatar Nov 29 '22 23:11 guyharris

Now that the last cmake warning is gone, should we enable -Werror=dev to better spot possible new warnings?

-Werror=dev
       Make developer warnings errors.

       Make  warnings  that  are  meant  for  the  author of the CMake-
       Lists.txt files errors. By default this will also turn on depre-
       cated warnings as errors.

fxlb avatar Nov 30 '22 08:11 fxlb

That's a good idea. In case any other long-standing warnings remain in the problem space, the build scripts might need to introduce something such as LIBPCAP_CMAKE_TAINTED and TCPDUMP_CMAKE_TAINTED.

infrastation avatar Nov 30 '22 09:11 infrastation

Done for libpcap with 0898548236721388d576d330971113eb23e2e517.

fxlb avatar Nov 30 '22 10:11 fxlb

Done for tcpdump with https://github.com/the-tcpdump-group/tcpdump/commit/625657ada89f6ab9056e3f918edb7052d3067438.

fxlb avatar Nov 30 '22 11:11 fxlb