[cmake-developers] escape double quote in generated file
Kyle Edwards
kyle.edwards at kitware.com
Fri Aug 30 13:24:40 EDT 2019
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
More information about the cmake-developers
mailing list