[Cmake-commits] CMake branch, next, updated. v3.2.1-1546-g86c4242

Gregor Jasny gjasny at googlemail.com
Tue Apr 7 09:04:07 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  86c4242ae6c4a91905ccf844373de94674bf02f8 (commit)
       via  dfd6f1f2904ca577743adb5f86f1722359723a0b (commit)
      from  8c5395350cd986450525b06ca9983325d5e19158 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=86c4242ae6c4a91905ccf844373de94674bf02f8
commit 86c4242ae6c4a91905ccf844373de94674bf02f8
Merge: 8c53953 dfd6f1f
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Tue Apr 7 09:04:06 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Apr 7 09:04:06 2015 -0400

    Merge topic 'xcode-quote-path' into next
    
    dfd6f1f2 Xcode: Also quote strings containing // (#15487)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dfd6f1f2904ca577743adb5f86f1722359723a0b
commit dfd6f1f2904ca577743adb5f86f1722359723a0b
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Sat Apr 4 22:13:45 2015 +0200
Commit:     Gregor Jasny <gjasny at googlemail.com>
CommitDate: Sat Apr 4 22:13:45 2015 +0200

    Xcode: Also quote strings containing // (#15487)
    
    Otherwise those will be interpreted as start of a comment
    
    Signed-off-by: Gregor Jasny <gjasny at googlemail.com>

diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 3302a8d..5a90fd9 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -242,6 +242,7 @@ void cmXCodeObject::PrintString(std::ostream& os,std::string String)
   // considered special by the Xcode project file parser.
   bool needQuote =
     (String.empty() ||
+     String.find("//") != String.npos ||
      String.find_first_of(" <>.+-=@$[],") != String.npos);
   const char* quote = needQuote? "\"" : "";
 
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

-----------------------------------------------------------------------

Summary of changes:
 Source/cmXCodeObject.cxx                                        |    1 +
 Tests/RunCMake/XcodeProject/RunCMakeTest.cmake                  |    1 +
 Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake   |    7 +++++++
 Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote.cmake         |    3 +++
 .../RunCMake/XcodeProject/someFileWithoutSpecialChars           |    0
 5 files changed, 12 insertions(+)
 create mode 100644 Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote-check.cmake
 create mode 100644 Tests/RunCMake/XcodeProject/XcodeObjectNeedsQuote.cmake
 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/XcodeProject/someFileWithoutSpecialChars (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list