mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 22:58:41 +00:00
ba39d7e9d0
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.
8 lines
394 B
CMake
8 lines
394 B
CMake
set(expect "-DKDESRCDIR=\\\\\\\\\\\\\"foo\\\\\\\\\\\\\"")
|
|
file(STRINGS ${RunCMake_TEST_BINARY_DIR}/XcodeObjectNeedsEscape.xcodeproj/project.pbxproj actual
|
|
REGEX "OTHER_CPLUSPLUSFLAGS = [^;]*;" LIMIT_COUNT 1)
|
|
if(NOT "${actual}" MATCHES "${expect}")
|
|
message(SEND_ERROR "The actual project contains the line:\n ${actual}\n"
|
|
"which does not match expected regex:\n ${expect}\n")
|
|
endif()
|