[cmake-developers] Limitations of IS_ABSOLUTE

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Dec 21 05:19:56 EST 2012


On 2012-12-21 09:43+0100 Eric Noulard wrote:

> 2012/12/21 Alan W. Irwin <irwin at beluga.phys.uvic.ca>:
>>  Obviously for my use case it does look like a
>> reasonable alternative is to use file(GLOB...) followed by a check of
>> the result variable to see if it is empty.  But implementation of an
>> additional IF subcommand called IS_FILE which just checks for the
>> existence of the specified file would do this in fewer lines and does
>
> Precisely the purpose of
> if(EXISTS ${file})
>
> I think.

Thanks, Eric.  EXISTS is what I needed.

I still think adding the qualifying phrase "if it exists or not" to the
IS_ABSOLUTE documentation would be useful.

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