[CMake] configure_file: escaping (single) quotes

CHEVRIER, Marc marc.chevrier at sap.com
Tue Jan 9 04:29:30 EST 2018


The problem comes from CMake evaluating variable VAR (i.e. expression ${VAR…}) and detect wrong syntax.
The solution is to specify option @ONLY to command configure_file to avoid ${} evaluation.


From: CMake <cmake-bounces at cmake.org> on behalf of Franck Houssen <franck.houssen at inria.fr>
Date: Tuesday 9 January 2018 at 10:24
To: CMake Mail List <cmake at cmake.org>
Subject: [CMake] configure_file: escaping (single) quotes

VAR="${VAR//'#'/}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180109/16d45a8f/attachment.html>


More information about the CMake mailing list