[CMake] configure_file: escaping (single) quotes

Franck Houssen franck.houssen at inria.fr
Tue Jan 9 04:24:21 EST 2018


Hello, 

I need configure_file to produce a bash file containing this line: 
VAR="${VAR// ' # ' /}" 

I tried without success VAR="${VAR// ' # ' /}" and VAR="${VAR// \' # \' /}" with and without ESCAPE_QUOTES in configure_file : always get an error like "Syntax error in cmake code when parsing string". 
Not a bash guru, and, can't get if the problem comes from bash or cmake... Can somebody help on this ? 

Franck 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180109/6aa65599/attachment.html>


More information about the CMake mailing list