So ...
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)
And with LOOSE set
if(cond1)
block of statements
elseif(cond2)
On 2006-09-17 20:27-0700 Brandon J. Van Every wrote:
... some rhetorical questions trying to convince me (and I guess
others) that I should not use CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS.
Regardless of such argumentation, the basic point remains,
CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS is already in the
Alan W. Irwin wrote:
So far all but one of those who responded to the discussion are in support
of the idea, but it is also fair to say that only a handful of subscribers
to this list have responded yet.
I am particularly interested in the opinion of Bill Hoffman, Brad King, and
other
On 2006-09-18 15:33-0700 David C Thompson wrote:
What if you named the construct something other than ELSEIF? For
instance:
ONEOF( LABEL )
CONDITION( cond_1 )
statements here if cond_1 is true
OR_CONDITION( cond_2 )
statements here if cond_1 is false and cond_2 is true
...
On Sat, 2006-09-16 at 13:39 -0700, Alan W. Irwin wrote:
To my mind those additional endelseif statements in this alternative
proposal go against the whole reason for my first proposal which is to
reduce the clutter that occurs in the equivalent existing form now present
in the language. Also,
On 2006-09-17 17:47-0700 Philip Lowman wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sat, Sep 16, 2006 at 01:39:57PM -0700, Alan W. Irwin wrote:
if(cond1)
block of statements
elseif(cond2)
block of statements
snip
elseif(condn)
block of statements
else(cond1)
block of
Philip Lowman wrote:
Requiring the user to specify else(cond1) and endif(cond1) may
prevent a few mistakes but it also gets kinda annoying as conditionals
get longer or change.
Agreed on being annoying as things get longer. It's a tradeoff between
safety and brevity.
It's *SUPPOSED* to
Alan W. Irwin wrote:
Agreed. I wish I had known about that CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS
variable before the CMake build system was completed for PLplot. It
would
have made my life a whole lot easier.
A whole lot easier? Just how many nested IF..ELSE..ENDIF statements
does your
Brandon J. Van Every wrote:
Alan W. Irwin wrote:
You can make a feature request with http://www.cmake.org/Bug/
The bug tracker, which contains the feature requests, is also searchable.
I do not agree that it's an obvious extension to the CMake language. If
elseif is introduced as
Alan W. Irwin wrote:
On 2006-09-16 12:11-0700 Brandon J. Van Every wrote:
It is the CMake language style to force the user to bracket their
conditional with matching conditions. Personally I think this is a
good design choice, especially as conditionals are nested deeper and
deeper, as it
10 matches
Mail list logo