[cmake-developers] escape double quote in generated file
Eugene Karpov
karpov.en at gmail.com
Mon Sep 2 04:43:28 EDT 2019
Yes, verbatim works to escape double quotes, but it doesn't work for join
by '\n' in the generated make file. So I switched to join by space.
Thank you.
пт, 30 авг. 2019 г. в 20:24, Kyle Edwards <kyle.edwards at kitware.com>:
> On Fri, 2019-08-30 at 19:01 +0300, Eugene Karpov wrote:
> > Not working too.
> > The failed lines in a generated make file looks like this
> > -----------------------
> > CMakeFiles/mkflags_test:
> > /usr/bin/cmake -DDEFINITIONS=-
> > DAPI=__attribute__((visibility("default"))) -
> > DFILENAME=/home/ekarpov/tmp/build/flags.txt -P
> > /home/ekarpov/tmp/escape_quotes.cmake
> > -----------------------
> >
> > And I've tried to double quote the DEFINITIONS parameter that is
> > passed to cmake - didn't help.
>
> Please try adding the VERBATIM option to add_custom_target():
>
> https://cmake.org/cmake/help/latest/command/add_custom_target.html
>
> Kyle
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20190902/a4d1dfc0/attachment.html>
More information about the cmake-developers
mailing list