MantisBT - Doomseeker
View Issue Details
0003266Doomseeker[All Projects] Bugpublic2017-09-19 06:472018-10-27 22:55
WubTheCaptain 
Blzut3 
lowminorsometimes
closedfixed 
x86_64
1.1 
1.21.2 
0003266: cmake_policy: OLD behavior for CMP0011 and CMP0020 is deprecated
Previously, Doomseeker set cmake policies to OLD on some files because "they're DLLs and have no main()", according to code comments.

Explicitly setting an OLD policy used to previously silence policy warnings. This is no longer the case: This behavior is deprecated and will be removed from a future CMake release.

Doomseeker should be fixed to work with the new behavior and the policy set to NEW (implicit) to maintain compatibility with build systems.
Use a reasonably recent version of CMake to reproduce. The oldest plausible version of CMake should be 3.3.*. Then in extracted source archive:

mkdir build
cmake ..


stderr should be filled with CMake Deprecation Warnings with pointers to source files and lines.
I'm using cmake 3.9.1.

cmake_policy documentation:'https://cmake.org/cmake/help/v3.0/command/cmake_policy.html [^]'

Example of a deprecation warning code line:
cmake_policy(SET CMP0020 OLD) # We have our own WinMain.

No tags attached.
log cmake-stderr.log (6,168) 2017-09-19 06:47
https://zandronum.com/tracker/file_download.php?file_id=2206&type=bug
Issue History
2017-09-19 06:47WubTheCaptainNew Issue
2017-09-19 06:47WubTheCaptainFile Added: cmake-stderr.log
2017-09-19 06:49WubTheCaptainNote Added: 0018335
2017-09-19 06:53WubTheCaptainNote Added: 0018336
2017-09-19 07:06WubTheCaptainNote Edited: 0018335bug_revision_view_page.php?bugnote_id=18335#r10964
2017-09-19 09:13WubTheCaptainNote Added: 0018341
2017-09-19 09:16WubTheCaptainNote Edited: 0018341bug_revision_view_page.php?bugnote_id=18341#r10972
2017-09-19 09:16WubTheCaptainNote Edited: 0018341bug_revision_view_page.php?bugnote_id=18341#r10973
2017-09-19 09:22WubTheCaptainNote Edited: 0018341bug_revision_view_page.php?bugnote_id=18341#r10974
2017-09-20 00:16Blzut3Assigned To => Blzut3
2017-09-20 00:16Blzut3Statusnew => assigned
2017-09-20 00:19Blzut3Note Added: 0018344
2017-09-23 02:46Blzut3Note Added: 0018358
2017-09-23 02:46Blzut3Statusassigned => resolved
2017-09-23 02:46Blzut3Fixed in Version => 1.2
2017-09-23 02:46Blzut3Resolutionopen => fixed
2017-09-23 02:46Blzut3Target Version => 1.2
2018-09-27 03:53WubTheCaptainNote Added: 0019788
2018-09-27 03:53WubTheCaptainProduct Version => 1.1
2018-10-27 22:55WubTheCaptainStatusresolved => closed

Notes
(0018335)
WubTheCaptain   
2017-09-19 06:49   
(edited on: 2017-09-19 07:06)
I forgot to fill in the operating system to the original ticket. I've used Debian GNU/Linux buster/sid.

The title is slightly misleading too: OLD behaviors of all policies are deprecated, not just CMP0011 and CMP0020 which appear in Doomseeker.

(0018336)
WubTheCaptain   
2017-09-19 06:53   
Latest cmake_policy documentation is there:'https://cmake.org/cmake/help/latest/command/cmake_policy.html [^]'
(0018341)
WubTheCaptain   
2017-09-19 09:13   
(edited on: 2017-09-19 09:22)
I surveyed some CMake versions found in GNU/Linux and *BSD distributions.

Debian GNU/Linux:


  • 2.8.9 (wheezy/oldoldstable)

  • 2.8.11 (wheezy-backports)

  • 3.0.2 (jessie/oldstable)

  • 3.6.2 (jessie-backports)

  • 3.7.2 (stretch/stable)

  • 3.9.0 (buster/testing)

  • 3.9.1 (buster/sid)



Arch GNU/Linux:


  • 3.9.2 (extra)



Ubuntu GNU/Linux:


  • 2.8.12 (trusty 14.04 LTS)

  • 3.5.1 (xenial 16.04 LTS)

  • 3.7.2 (zesty 17.04)

  • 3.9.1 (artful 17.10)



Gentoo GNU/Linux:


  • 3.7.2 (stable)

  • 3.8.2 (testing)

  • 3.9.1 (testing)

  • 3.9.2 (testing)



OpenBSD:


  • 3.5.2 (6.0-stable)

  • 3.7.2 (6.1-stable)

  • 3.9.2 (snapshots)



FreeBSD:


  • 3.9.2



NetBSD:


  • 3.6.2 (7.0)

  • 3.7.1 (7.0)

  • 3.8.2 (7.0)

  • 3.9.2 (7.1)



(0018344)
Blzut3   
2017-09-20 00:19   
Actually already have this addressed on my laptop among some other CMake modernization work I was doing. (Just haven't committed it since for some reason the system clock on there is all over the place and I got into a state were CMake was fighting with itself since files were modified in the future. Don't know if my homebrew laptop is to blame or Windows, but I'm just rambling at this point.)

Interestingly I can't figure out why we set CMP0020 to OLD since removing it seems to have no side effect.
(0018358)
Blzut3   
2017-09-23 02:46   
Should be fixed now.

'https://bitbucket.org/Doomseeker/doomseeker/commits/97b4132754469a42dd14fbe856b82dc6885fa204 [^]'
(0019788)
WubTheCaptain   
2018-09-27 03:53   
Postscript note: The issue was introduced in commit 224428663c7a shortly after 1.0 release.