summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-08 13:06:59 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-04-08 13:06:59 (GMT)
commit710968e37171681cb32e74d6249a4fd7daacf42e (patch)
tree77b4ae1a72c3c0e9f63ad7062ce4084e928e80ee /Tests/RunCMake
parentbddd8c055104d7c66b01799a4c99a2bbb6da8f00 (diff)
parentdfd6f1f2904ca577743adb5f86f1722359723a0b (diff)
downloadCMake-710968e37171681cb32e74d6249a4fd7daacf42e.zip
CMake-710968e37171681cb32e74d6249a4fd7daacf42e.tar.gz
CMake-710968e37171681cb32e74d6249a4fd7daacf42e.tar.bz2
Merge topic 'xcode-quote-path'
dfd6f1f2 Xcode: Also quote strings containing // (#15487)
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake7
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote.cmake3
-rw-r--r--Tests/RunCMake/XcodeProject/someFileWithoutSpecialChars0
4 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 03d3cd3..b7de614 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -3,6 +3,7 @@ include(RunCMake)
run_cmake(XcodeFileType)
run_cmake(XcodeAttributeGenex)
run_cmake(XcodeAttributeGenexError)
+run_cmake(XcodeObjectNeedsQuote)
if (NOT XCODE_VERSION VERSION_LESS 6)
run_cmake(XcodePlatformFrameworks)
endif()
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()
diff --git a/Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote.cmake b/Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote.cmake
new file mode 100644
index 0000000..ecc56ab
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+add_library(some /${CMAKE_CURRENT_SOURCE_DIR}/someFileWithoutSpecialChars)
+set_property(SOURCE /${CMAKE_CURRENT_SOURCE_DIR}/someFileWithoutSpecialChars PROPERTY LANGUAGE C)
diff --git a/Tests/RunCMake/XcodeProject/someFileWithoutSpecialChars b/Tests/RunCMake/XcodeProject/someFileWithoutSpecialChars
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/someFileWithoutSpecialChars