[CMake] Chicken and egg problem with cmake_minimum_required(...), project(...), and CMAKE_SYSTEM_NAME

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri May 1 14:28:20 EDT 2015


On 2015-05-01 14:38+0200 Hendrik Sattler wrote:

>
>
> Am 1. Mai 2015 12:41:50 MESZ, schrieb David Cole via CMake <cmake at cmake.org>:
>> I would strongly recommend NOT having different minimum versions for
>> Linux vs. everywhere else.
>
> I did something similar one but based on the generator.
> It might makes sense when you generally want to support an older version but some cases are broken. For me it was AUTO_DEPENDS. However a new version might be problematic in combination with other things.
>

To Hendrik, David, and Brad:

I think we all agree that different minimum versions for different
platforms are far from ideal, but as Hendrik has said there are
sometimes exceptions.  For the present exceptional case the
combination of specific reasons are (1) my desire to move to CMP0026
NEW now rather than waiting a couple of years until our minimum
version on Linux is 3.2; (2) a bug in permissions for file(GENERATE..)
only fixed in 3.2; (3) a build-time workaround for that bug readily
available only as a GNU extension of chmod; and (4) a "political"
desire on our part to use a minimum CMake version of 3.0.2 on Linux so
that our many users who build the latest PLplot on that platform can
generally use the system version of CMake rather than being forced to
build the latest CMake.

My big thanks to Brad for recommending a general solution for the case
where different minimum versions are needed on different platforms.

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 mailing list