[CMake] LIST bugs for cmake version 2.6-patch 0 RC-8

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed May 7 18:18:08 EDT 2008


On 2008-05-07 17:03-0400 Brad King wrote:

> The policy is about the LIST command and how it deals with lists whose
> *names* are given and not the *values*.  This is the FOREACH command
> which currently always deals with values.  A fundmental rule in CMake
> syntax is that the argument
>
>  ${MYVAR}
>
> expands lists and removes empty elements in all contexts

I agree there is a broader issue here than just the LIST command or just the
FOREACH command. However, let's talk about that broader issue, i.e., the
issue concerning how LIST variables are expanded in all contexts where
normally an ordinary explicit list of values is required as arguments.  Is
there any practical justification for removing empty elements from a LIST
variable expansion inconsistently with how an ordinary explicit list with
empty values is treated?

I used your FOREACH example in my post, but it is really this expansion
inconsistency in all contexts which bothers me. Your answer so far is
essentially "we have always done it that way".  Perhaps there are excellent
practical reasons for that language quirk that are obvious to you, but I
cannot think of what those might be at the moment so I would appreciate
your help in identifying those practical reasons.

If it turns out there are actually no practical reasons justifying this
current language inconsistency, then I suggest this consistency issue should
be dealt with to help evolve the CMake language into something that is less
confusing.  Of course, at the same time the corresponding backwards
compatibility issue should be dealt with using the POLICY mechanism
(presumably with a new independent policy number rather than CMP0007).

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