[cmake-developers] Fortran detection, issue 9220

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Feb 11 14:54:45 EST 2015


On 2015-02-11 09:44-0500 Brad King wrote:

> Also one would need to decide what determines whether an optional language
> is not available.  If a compiler is available but cannot compile binaries,
> should that be an error or tolerated as "not available"?  As a user I would
> expect setting FC=/path/to/gfortran in my environment before calling CMake
> to cause Fortran to be enabled if the project wants it or else an error.

Tolerated with a warning please.  Unsophisticated users could have
environment variables set that they are completely unaware of.  And I
have run across scientific users of Fortran who assumed that Fortran
compiler options (which can be set either with the FC variable or
FFLAGS) were universal regardless of compiler (so they were
inadvertently attempting to use some exotic solaris fortran compiler
options for gfortran).

>From these experiences with unsophisticated compiler users, my own
feeling is OPTIONAL should mean just that, i.e., warn instead of error
out for all cases.  That's how we currently deploy the workaround for
PLplot, and I have never had a user complaint about getting those soft
landings when a compiler didn't work properly.  (Maybe because our
warning messages are really obvious when a compiler does not work.)

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