[cmake-developers] New EVIS parser moving forward (3.1)

Rolf Eike Beer eike at sf-mail.de
Fri Feb 21 15:30:36 EST 2014


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 
<ben.boeckel at kitware.com>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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140221/7f13bc51/attachment-0002.sig>


More information about the cmake-developers mailing list