[Insight-developers] can cmake generate an error if a variable doesn't exist ?

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Jan 13 03:33:00 EST 2006


On Thu, 12 Jan 2006 17:28:21 +0100, William A. Hoffman  
<billlist at nycap.rr.com> wrote:

> At 09:39 AM 1/12/2006, Gaetan Lehmann wrote:
>
>> Hi,
>>
>> Can cmake generate an error if a variable doesn't exist, instead of
>> returning an empty value ?
>> It would highly simplify debugging big cmake projects (like wrappers).
>
> If you attempt to use a NOTFOUND variable for includes, libraries or  
> library
> directories cmake does produce an error.  I am not sure if that is
> what you are looking for.

I was thinking to something like

MESSAGE("VAR value is: ${VAR}")

where VAR is not defined. I would like to get an error, or at least a  
warning, instead of an empty value.

> Also, this discussion really belongs on the
> cmake mailing list.

Ok, so lets continue there.

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-developers mailing list