Brandon,

a small breeze of fresh air in escape hell..., I figured it out. In fact it 
had not so much to do with cmake escape but with *make* $$ type of escape. 
Actually $$ did the trick...

cheers
Chris 


Am Dienstag 15 Januar 2008 20:21:39 schrieb Brandon Van Every:
> On Jan 15, 2008 7:59 AM, Christopher Lang <[EMAIL PROTECTED]> 
wrote:
> > Hi,
> >
> > I am trying desperately to get the dollar sign ($) escaped properly in
> > the following:
> >
> > ADD_CUSTOM_TARGET (read_potfiles_in ALL
> >         COMMAND grep -Ev '^\#|^\\[|^$' POTFILES.in > POTFILES.in.cmake
> >         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
> > )
> >
> > I searched everything but did not find a solution to get that dollar sign
> > escaped.
> >
> > The result always looks like this:
> >
> > ...
> > cd /home/chris/workspace/l2nl/po && grep -Ev '^#|^\[|^ POTFILES.in >
> > POTFILES.in.cmake
> >
> > Escaping with signle or double \\ does not work.
>
> Welcome to escape hell.  :-)  I can't comment on the special kind of
> hell that is the COMMAND statement, whether VERBATIM or not.   I
> haven't been doing many of those lately.  I can tell you all about $
> escapes within regular expression strings though.
>
> In a regex, outside of [] you need \\$
> In a regex, inside of [] you do not need anything.  [$] is fine.
> In a non-regex string, in front of a curly bracket you need \${
> set(blah "whatever but \${do_not_evaluate}")
> In a regex string, in front of a curly bracket you need \\\${
> string(REGEX REPLACE
>   ".*whatever but \\\${do not evaluate}"
>
> I am still too lazy to write this up on
> http://www.cmake.org/Wiki/CMake:VariablesListsStrings
> I think because I perceive this wiki page as a bit buried in the shuffle.
>
>
> Cheers,
> Brandon Van Every
> _______________________________________________
> CMake mailing list
> CMake@cmake.org
> http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to