CMake/Tests/RunCMake/XcodeProject/XcodeObjectNeedsEscape.cmake
Gregor Jasny ba39d7e9d0 Xcode: Escape all backslashes in strings (#15328)
Before this change backslashes in strings were escaped during compile
flags adds via AppendFlag(). But global flags like OTHER_CPLUSPLUSFLAGS
are not added as flags but as plain strings so they were not escaped
properly.

Now the escaping is performed within cmXCodeObject::PrintString() which
ensures that strings are always encoded.
2016-01-07 13:23:24 -05:00

4 lines
111 B
CMake

enable_language(CXX)
string(APPEND CMAKE_CXX_FLAGS " -DKDESRCDIR=\\\"foo\\\"")
add_library(foo STATIC foo.cpp)