Am Freitag, 21. Februar 2014, 14:51:19 schrieben Sie: > On Fri, Feb 21, 2014 at 14:18:02 -0500, Jean-Christophe Fillion-Robin wrote: > > On Fri, Feb 21, 2014 at 12:05 PM, Ben Boeckel <[email protected]>wrote: > > > I agree in general, however, my CMake style is to quote all variable > > > expansions unless I want argument splitting. This rule would break code > > > > > > like this: > > > if ("CMAKE_${LANG}_FLAGS") > > > endif () > > > > > > which would be unfortunate, IMO. > > > > As a quick check, I ran the following search on CMake code base and it > > > > returns nothing: > > cd ./CMake-src > > ack --cmake "\(\s*\"[a-zA-Z0-9]+\$" > > > > Also nothing for Slicer, ITKv4, VTK6, ... > > Yeah, I don't expect it to be common. > > As a more extensive check, the following gives no results in ParaView, > VTK, or VXL which one would expect the name quoted string to be treated > as a variable name: > > git grep 'if\s*(' -- '*.cmake' '**/CMakeLists.txt' | \ > grep --color=yes -e '"\([^$ ][^"]\+\)\?"' > > It does miss multi-line if statements though. > > > If possible, not having implicit expansion for quoted argument would be > > great at make things more intuitive and practical. > > If I made a branch which warned when implicit expansion was done, would > folks be willing to run it over various codebases to see how annoying it > would be to just remove it altogether?
If you have the time to hack that together I'll find the time to test this. Another good place to ask would be to get that branch into the KDE buildbots, that would get a big amount of projects covered. Eike
signature.asc
Description: This is a digitally signed message part.
-- 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
