[CMake] elseif request
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Sat Sep 16 11:51:14 EDT 2006
I would like to request an elseif extension to the cmake language. Many
computer languages have an elseif or equivalent to make it much easier to
organize blocks of of conditional expressions, and it would be extremely
useful if the CMake language had this capability as well.
To be concrete about the proposal I suggest the following obvious syntax:
if(cond1)
block of statements
elseif(cond2)
block of statements
elseif(cond3)
block of statements
...
elseif(condn)
block of statements
else(cond1)
block of statements
endif(cond1)
The various elseif statements are optional as is (like now) the
else statement. Thus, this proposed syntax would not disrupt
older cmake programmes.
My apologies in advance if I have missed elseif or equivalent in the
documentation, but I have searched hard for it and cannot find it. This is
such an obvious extension that I assume it is on some CMake ToDo list
somewhere, and/or wish-list bug entries.
Consider this post a reminder to give higher priority to implementing this
useful language element.
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