[cmake-developers] CMP0022 documentation is outdated

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Dec 23 07:25:52 EST 2017


On 2017-12-19 14:18-0800 Alan W. Irwin wrote:

> I have a software project with a dated CMake-based build system that
> specifically set CMP0022 to OLD.  So while updating that build system
> I naturally consulted the latest CMP0022 documentation, e.g.,
> <https://cmake.org/cmake/help/git-stage/policy/CMP0022.html>, and
> discovered that documentation was outdated, e.g.,
> lots of historical references to CMake-2.8 which are likely no
> longer needed, and the following recommendation
>
> Warning-free future-compatible code which works with CMake 2.8.7
> onwards can be written by using the LINK_PRIVATE and LINK_PUBLIC
> keywords of target_link_libraries().
>
> (The obvious problem with that advice is that LINK_PRIVATE and
> LINK_PUBLIC are now deprecated themselves!)
>
> IF cmake-4 is coming soon and presuming that CMP0022 OLD behaviour
> will no longer be supported by that version of cmake, then you may not
> want to do anything about this outdated documentation since it will
> be removed with cmake-4.
>
> But otherwise for current needs like mine (updating an old build system
> that specifically set CMP0022 to OLD) a complete rewrite would
> be a good idea with the emphasis on simplifying down to one
> or two sentences such as
>
> Support for CMP0022 OLD behaviour is scheduled for removal with
> cmake-4 [if that decision has indeed already been made] so do not set
> this policy to OLD for new build systems.  But if you need to know
> details about CMP0022 OLD behaviour in order to upgrade an old build
> system that currently requires the OLD version of this policy, see the
> target_link_libraries() documentation.

Hmm.  I got no responses to the above.  So I guess the conclusion is
it's a very low priority to update the documentation of ancient
policies like this one.  I guess that's fine if the plan is these
ancient policies will finally be retired as of CMake-4 AND that new
major version of CMake (which presumably will be allowed to break
backwards compatibility) is coming reasonably soon.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the cmake-developers mailing list