[CMake] syntax error?

Brad King brad.king at kitware.com
Thu Aug 15 09:09:01 EDT 2013


On 08/15/2013 07:40 AM, David Cole wrote:
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2ac3463b5ef5dfd3fc662c12aaaacdd177e5dc1
> 
> git says it's only in 'next' and 'nightly' so far:

Actually that one was rewritten and is in master:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=58e52416

> The commit message explains the rationale. Not sure if Brad is aware 
> the warning can be triggered by parenthesized expressions in the if 
> command... Brad?

I was aware that a left paren after another token would warn but
did not think about the use case in if() expressions.  If I were
designing the language from scratch I probably wouldn't want to
allow this but it is probably fairly common now.  The purpose of
the warning was for other cases so it is okay to tolerate this.
Fixed and test added:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9040ec91

Thanks,
-Brad


More information about the CMake mailing list