[CMake] elseif request

Ken Martin ken.martin at kitware.com
Tue Sep 19 10:26:10 EDT 2006


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)
>    block of statements
> elseif(cond3)
>    block of statements
> 
> ...
> 
> elseif(condn)
>    block of statements
> else()
>    block of statements
> endif()

Seems like a reasonable idea to me and I think it can be implemented fairly
easily. Folks who like more strict closing structures can nest their IF
statements as is currently done. 

Ken




More information about the CMake mailing list