[CMake] case in IF statements

Ken Martin ken.martin at kitware.com
Thu Jun 15 12:14:39 EDT 2006


>From bug id #3119

I looked into this. The issue is that NOT is an argument to the if command
and currently arguments are not case insensitive. To make this change and be
consistent we would need to modify every command in cmake to be case
insensitive to its arguments which might be a good idea, but is a bit of
work and currently not on the agenda. This becomes more confusing for
commands where a file name is an argument because in those cases (for UNIX)
the arguments really are case sensitive.  The same applies to many string
type functions. We could say only keyword arguments to functions are case
insensitive but for now I think it is easiest to leave it as is.



> -----Original Message-----
> From: cmake-bounces+ken.martin=kitware.com at cmake.org [mailto:cmake-
> bounces+ken.martin=kitware.com at cmake.org] On Behalf Of Karl Merkley
> Sent: Thursday, June 15, 2006 12:06 PM
> To: cmake at cmake.org
> Subject: [CMake] case in IF statements
> 
> I'm playing with cmake 2.4-2.   I read recently that had been changed
> to accept lower case arguments  (if instead of IF).  However, it
> appears that modifiers within the IF statement still must be upper
> cased.  For example,  if (NOT UNIX)  appears to work but if (not
> UNIX) fails.   I noticed the same behavior with AND, MATCHES and
> STREQUAL in an IF statement.    Is this by design or is it a bug?
> 
>      Karl
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake




More information about the CMake mailing list