RE: [CMake] elseif request

2006-09-19 Thread Ken Martin
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)

Re: [CMake] elseif request

2006-09-18 Thread Alan W. Irwin
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

Re: [CMake] elseif request

2006-09-18 Thread Brad King
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

Re: [CMake] elseif request

2006-09-18 Thread Alan W. Irwin
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 ...

Re: [CMake] elseif request

2006-09-17 Thread Jamie Jones
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,

Re: [CMake] elseif request

2006-09-17 Thread Alan W. Irwin
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

Re: [CMake] elseif request

2006-09-17 Thread Brandon J. Van Every
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

Re: [CMake] elseif request

2006-09-17 Thread Brandon J. Van Every
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

Re: [CMake] elseif request

2006-09-16 Thread Filipe Sousa
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

Re: [CMake] elseif request

2006-09-16 Thread Brandon J. Van Every
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