[CMake] Testing whether a variable has already been assigned a non-null value

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Oct 2 14:43:23 EDT 2006


On 2006-10-02 10:39-0400 Brad King wrote:

> IF(DEFINED X)
>
> The MATCHES hack is left over from code written before IF(DEFINED ...)
> was implemented.

Thanks, Brad, for pointing me to DEFINED.  That was exactly what I needed.
It is obviously there in the documentation, but I missed it and was trying
to use the MATCHES hack instead.

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); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); 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