[CMake] Disabling IF strict checking

Bill Hoffman bill.hoffman at kitware.com
Fri May 23 22:43:14 EDT 2008


Eduardo Alberto Hernández Muñoz wrote:
> Hi list,
> 
> I am wondering if there is a way to disable checking that the ELSE and
> ENDIF arguments need to the the same as the initial IF. For example,
> instead of
> 
>    IF ( HUNGRY )
>        MESSAGE ( "Go get some food!" )
>    ENDIF ( HUNGRY )
> 
> you can type
> 
>    IF ( HUNGRY )
>        MESSAGE ( "Go get some food!" )
>    ENDIF ( )
> 
> I know that this is meant to catch errors, but I think it's cleaner
> this way.
> 

This is the default in CMake 2.6, you don't need to specify the 
statement in the endif.

-Bill


More information about the CMake mailing list