On 2013-10-21 13:36, Alexander Neundorf wrote:
On Friday 11 October 2013, Brad King wrote:
Hi Folks,
I think the time has come for a major version number bump to go with
some major updates. I propose to skip preparing 2.8.13 in 'master'
and go straight to 3.0.0.
Potential changes motivating a major version number bump include:
* Drop implementation of compatibility modes with CMake versions
prior to 2.4.0 which is now over 7 years old.
Would this also be a chance to change the if( STREQUAL ) string vs. variable
lookup rules ?
That would be *awesome* :-D.
Relatedly, though I imagine it could be done with a policy at any time,
it would be nice to explicitly disallow variable names that are not
valid C++ identifiers (i.e. that don't match "[[:alnum:]_]+"). This at
least would make it reliable to do like:
if ("%${var}" STREQUAL "%value")
...with even further reduced danger that "%${var}" is a variable name.
Or introduce the whole set of comparison operators ("==", "<", etc.), which
would then never do variable lookup, and "deprecate" the current ones ?
That's come up before and been rejected.
IMHO the "correct" solution is to not do implicit expansion on quoted
arguments. This might still need a policy, but it's much less likely
anything in quotes is expected to be a variable name. However as I
understand it, actually doing that is hard.
Also relatedly, it would be nice to actually handle lists as a separate
data type (e.g. so list expansion doesn't have so many weird corner
cases, lists can be nested, etc.). But again, hard :-(.
--
Matthew
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers