summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2015-04-04 20:13:45 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2015-04-04 20:13:45 (GMT)
commitdfd6f1f2904ca577743adb5f86f1722359723a0b (patch)
treec821c336f114ceadc09f066855a5e436222a084d /Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake
parentc6624cfdc1fe9c7c53ad9ed06da759df803aef71 (diff)
downloadCMake-dfd6f1f2904ca577743adb5f86f1722359723a0b.zip
CMake-dfd6f1f2904ca577743adb5f86f1722359723a0b.tar.gz
CMake-dfd6f1f2904ca577743adb5f86f1722359723a0b.tar.bz2
Xcode: Also quote strings containing // (#15487)
Otherwise those will be interpreted as start of a comment Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Diffstat (limited to 'Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake')
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake b/Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake
new file mode 100644
index 0000000..be7d96a
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake
@@ -0,0 +1,7 @@
+set(expect "path = \"")
+file(STRINGS ${RunCMake_TEST_BINARY_DIR}/XcodeObjectNeedsQuote.xcodeproj/project.pbxproj actual
+ REGEX "path = [^;]*someFileWithoutSpecialChars[^;]*;" 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()