[cmake-developers] Is the "cmake_policy (VERSION 3.11)" statement in the latest UseSWIG.cmake correct?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Apr 4 15:10:21 EDT 2018


According to
<https://cmake.org/cmake/help/git-stage/command/cmake_policy.html>, an
important side effect of "cmake_policy (VERSION 3.11)" is that no user
with cmake version less than 3.11.0 can use the latest version of
UseSWIG.cmake.

Was that change intended (i.e., does the latest version of
UseSWIG.cmake use policies AND CMake logic that is only available for
3.11.0 and higher)? If so, fair enough.  But if not (i.e., the latest
version of UseSWIG.cmake would work fine for earlier versions of
CMake) I suggest you adjust the above VERSION 3.11 to the actual
minimum version of CMake that will work with this module to advertise
what range of older versions of CMake can use it as a replacement for
the buggy official UseSWIG.cmake that they would otherwise be using.

This reason this issue has come up for me is that I had to copy the
3.9.1 UseSWIG.cmake module to PLplot to give our users that use older
versions of CMake such as 3.6.2 access to an important bug fix in that
version. And that copy has worked fine for us ever since for those
using, e.g., cmake version 3.6.2.  So as a result I became interested
in the official further development of UseSWIG.cmake module after
3.9.1 in case there were any further bug fixes that would be important
to our users.  And that investigation left me wondering whether that
"cmake_policy (VERSION 3.11)" statement actually states the correct
minimum version of cmake that would work with this module.

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