> Hi,
>
> I can most of shell commands in execute_process(), but cmake failed at
> following errors when I added "sed 's/^.\///g'" to execute_process():
>
> Syntax error in cmake code, when parsing string 's/^.\///g', Invalid
> escape
> sequence \/, Call Stack ...
>
> But without the escape sequence \/, the shell command could not run, how
> can
> I make the execute_process() run shell command with escape sequence \/ ?
You must escape the backslash, so it doesn't get stripped by the CMake
parser: 's/^.\\///g'
Bonus trick: you can avoid it altogether by just using a different
character as delimiter: 's,^./,,g'
Just wondering: do you want to work on some find output? Then you also
need to escape the ".".
Eike
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.htmlPlease keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQFollow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake