[cmake-developers] [PATCH] remove "x" placeholder from STREQUAL operands

Matthew Woehlke mw_triad at users.sourceforge.net
Thu Apr 17 17:17:21 EDT 2014


On 2014-04-13 03:37, Rolf Eike Beer wrote:
> Sadly the expression is even expanded when it is quoted as long as it is a
> valid variable name. So what you could do is: replace the "x" by a simple
> space and then quote the match string, because " Linux" is no valid variable
> name.

set(" Linux" Windows) # succeeds

Alas, the only character that may not appear in a variable name is '\0'. 
(And even that is more due to use of raw char* with no length than 
intent, I bet.)

I keep hoping that one of these days CMake would define valid 
identifiers as '[[:letter:]_][[:alnum:]_-]*'...

-- 
Matthew




More information about the cmake-developers mailing list