[Cmake-commits] CMake branch, next, updated. v2.8.12.1-7158-gf1abf07

Brad King brad.king at kitware.com
Thu Jan 16 13:53:09 EST 2014


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  f1abf072f645013c234dba86554bfb0f0c3f78da (commit)
       via  1ce02ebfd57da6e58b77399648ec758c2f812656 (commit)
       via  d9f1f917c46c8faa4ac02f496d20487882e7f010 (commit)
      from  728d8bd85e10f2f18d56f28c6f9262a2ffe9f520 (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=f1abf072f645013c234dba86554bfb0f0c3f78da
commit f1abf072f645013c234dba86554bfb0f0c3f78da
Merge: 728d8bd 1ce02eb
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 16 13:53:08 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 16 13:53:08 2014 -0500

    Merge topic 'xcode-storyboard-view' into next
    
    1ce02ebf Xcode: Fix storyboard view
    d9f1f917 Xcode: Remove dead code


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ce02ebfd57da6e58b77399648ec758c2f812656
commit 1ce02ebfd57da6e58b77399648ec758c2f812656
Author:     Ruslan Baratov <ruslan_baratov at yahoo.com>
AuthorDate: Thu Jan 16 22:16:34 2014 +0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 16 13:46:21 2014 -0500

    Xcode: Fix storyboard view
    
    Images and xib files must have 'lastKnownFileType' attribute to be
    displayed correctly. If xib file has attribute 'explicitFileType' it is
    displayed as raw xml. If static image has attribute 'explicitFileType'
    it is displayed as question mark on storyboard.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 82466c9..41961ed 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -753,7 +753,8 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
 //----------------------------------------------------------------------------
 std::string
 GetSourcecodeValueFromFileExtension(const std::string& _ext,
-                                    const std::string& lang)
+                                    const std::string& lang,
+                                    bool& keepLastKnownFileType)
 {
   std::string ext = cmSystemTools::LowerCase(_ext);
   std::string sourcecode = "sourcecode";
@@ -764,10 +765,12 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
     }
   else if(ext == "xib")
     {
+    keepLastKnownFileType = true;
     sourcecode = "file.xib";
     }
   else if(ext == "storyboard")
     {
+    keepLastKnownFileType = true;
     sourcecode = "file.storyboard";
     }
   else if(ext == "mm")
@@ -793,6 +796,7 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
     }
   else if(ext == "png" || ext == "gif" || ext == "jpg")
     {
+    keepLastKnownFileType = true;
     sourcecode = "image";
     }
   else if(ext == "txt")
@@ -871,8 +875,10 @@ cmGlobalXCodeGenerator::CreateXCodeFileReferenceFromPath(
     }
   else
     {
-    std::string sourcecode = GetSourcecodeValueFromFileExtension(ext, lang);
-    const char* attribute = (sourcecode == "file.storyboard") ?
+    bool keepLastKnownFileType = false;
+    std::string sourcecode = GetSourcecodeValueFromFileExtension(ext,
+                             lang, keepLastKnownFileType);
+    const char* attribute = keepLastKnownFileType ?
                              "lastKnownFileType" :
                              "explicitFileType";
     fileRef->AddAttribute(attribute,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9f1f917c46c8faa4ac02f496d20487882e7f010
commit d9f1f917c46c8faa4ac02f496d20487882e7f010
Author:     Ruslan Baratov <ruslan_baratov at yahoo.com>
AuthorDate: Thu Jan 16 21:57:58 2014 +0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 16 13:43:47 2014 -0500

    Xcode: Remove dead code
    
    Variable 'ext' already checked for equality to "xib" so remove the
    branch that will never be executed.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f7a42fc..82466c9 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -778,10 +778,6 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
     {
     sourcecode += ".c.objc";
     }
-  else if(ext == "xib")
-    {
-    sourcecode += ".file.xib";
-    }
   else if(ext == "plist")
     {
     sourcecode += ".text.plist";

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

Summary of changes:
 Source/cmGlobalXCodeGenerator.cxx |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list