On Thu, Apr 17, 2014 at 17:17:21 -0400, Matthew Woehlke wrote:
> set(" Linux" Windows) # succeeds

Even better:

    set("
    Linux" Windows)

> 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.)

Actually, it's all std::string now, so you *could* use std::string(nuls,
len) to make one. But that means modifying the CMake code and shouldn't
be possible through CMakeLists.txt.

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

Make a policy for it. Watch the world burn :) . I also don't know where
you'd stick the validator without a decent performance hit (the regex
engine is not the best) :( . May as well stick the restriction on
function and macro names as well. Not that you could call any function
named in such a way, but better safe than sorry.

--Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to