[CMake] escape characters in strings
Nico Schlömer
nico.schloemer at gmail.com
Thu Mar 20 10:20:31 EDT 2014
Hi all,
in a CMake export file, I've got the line
```
SET(${LIBNAME}_CXX_FLAGS "${CMAKE_CXX_FLAGS}
${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}")
```
where the variables are replaced accordingly. A problem occurs if the
variable ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}} contains double
quotes; they should be escaped. I'm not sure if the quotation marks in
the above line could be left out.
What is the proper way of handling this?
Cheers,
Nico
More information about the CMake
mailing list