[Cmake-commits] CMake branch, next, updated. v3.2.2-1891-g00b8efc
Gregor Jasny
gjasny at googlemail.com
Fri Apr 17 15:51:45 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 00b8efc2713bfd3e7ef56223bd6b0e9afcc9eaa0 (commit)
via 6693590f8144a905b423ca03fa8ed98df4468bae (commit)
via a6331eb851c132d3d0496e738886ad76e13a92a0 (commit)
via 6e8952c19385acb0ff9f58c2a462d91dd0624e05 (commit)
via 4bd2544b25655b6e20e5098a5f4cdd973288c106 (commit)
via 5cb4c8380d9a0f5922a2eed60f6a1fd1274e9141 (commit)
via a723427b6450c1ec77226fb58aa3070a341891a2 (commit)
via 2fe8bca58089fb03f0ffa16792cc15fb741bd22c (commit)
via 2e0e205e28922c6584a35ce6ec9966485df47b0d (commit)
via 7b68c8df6b78951e6d04eea62c3d5cc056796993 (commit)
from bef4d783bf5694dc03cb6f1e1f5021df744f628e (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=00b8efc2713bfd3e7ef56223bd6b0e9afcc9eaa0
commit 00b8efc2713bfd3e7ef56223bd6b0e9afcc9eaa0
Merge: bef4d78 6693590
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Fri Apr 17 15:51:43 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Apr 17 15:51:43 2015 -0400
Merge topic 'stable-xcode-projects' into next
6693590f Xcode: Refine quoting rules for Strings
a6331eb8 Xcode: Let PrintComment decide if the comment is non-empty
6e8952c1 Xcode: PrintComment will prepend a whitespace itself before the comment
4bd2544b Xcode: Do not add whitespace after attribute group opening brace
5cb4c838 Xcode: Properly indent PBXFileReference and PBXBuildFile
a723427b Xcode: Remove extra space in PBXProject comment
2fe8bca5 Xcode: Add comment after root object
2e0e205e Xcode: Indent using tabs
7b68c8df Xcode: Sort Xcode objects by Id
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6693590f8144a905b423ca03fa8ed98df4468bae
commit 6693590f8144a905b423ca03fa8ed98df4468bae
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Thu Apr 9 11:04:35 2015 +0200
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Fri Apr 17 21:50:05 2015 +0200
Xcode: Refine quoting rules for Strings
$ and . do not need to be quoted, but brackets and * must be to
not confuse the Xcode parser.
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index b9c41f3..e72d315 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -243,7 +243,7 @@ void cmXCodeObject::PrintString(std::ostream& os,std::string String)
bool needQuote =
(String.empty() ||
String.find("//") != String.npos ||
- String.find_first_of(" <>.+-=@$[],") != String.npos);
+ String.find_first_of(" <>+-*=@[](){},") != String.npos);
const char* quote = needQuote? "\"" : "";
// Print the string, quoted and escaped as necessary.
diff --git a/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake b/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake
index 7882d7f..1847bc9 100644
--- a/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake
@@ -1,6 +1,6 @@
set(expect-default "explicitFileType = sourcecode")
-set(expect-explicit "explicitFileType = \"sourcecode.c.h\"")
-set(expect-lastKnown "lastKnownFileType = \"sourcecode.c.h\"")
+set(expect-explicit "explicitFileType = sourcecode.c.h")
+set(expect-lastKnown "lastKnownFileType = sourcecode.c.h")
foreach(src default explicit lastKnown)
file(STRINGS ${RunCMake_TEST_BINARY_DIR}/XcodeFileType.xcodeproj/project.pbxproj actual-${src}
REGEX "PBXFileReference.*src-${src}")
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6331eb851c132d3d0496e738886ad76e13a92a0
commit a6331eb851c132d3d0496e738886ad76e13a92a0
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Thu Apr 9 10:48:33 2015 +0200
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Fri Apr 17 21:50:05 2015 +0200
Xcode: Let PrintComment decide if the comment is non-empty
diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx
index 96f7b0f..f30f700 100644
--- a/Source/cmXCode21Object.cxx
+++ b/Source/cmXCode21Object.cxx
@@ -31,6 +31,10 @@ void cmXCode21Object::PrintComment(std::ostream& out)
cmSystemTools::ReplaceString(this->Comment, "\"", "");
}
}
+ if(this->Comment.empty())
+ {
+ return;
+ }
out << " /* ";
out << this->Comment;
out << " */";
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index e41f282..b9c41f3 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -99,10 +99,7 @@ void cmXCodeObject::Print(std::ostream& out)
indentFactor = 0;
}
out << this->Id;
- if(!(this->IsA == PBXGroup && this->Comment.size() == 0))
- {
- this->PrintComment(out);
- }
+ this->PrintComment(out);
out << " = {";
if(separator == "\n")
{
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e8952c19385acb0ff9f58c2a462d91dd0624e05
commit 6e8952c19385acb0ff9f58c2a462d91dd0624e05
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Thu Apr 9 10:14:47 2015 +0200
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Fri Apr 17 21:50:05 2015 +0200
Xcode: PrintComment will prepend a whitespace itself before the comment
diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx
index 855e1ad..96f7b0f 100644
--- a/Source/cmXCode21Object.cxx
+++ b/Source/cmXCode21Object.cxx
@@ -31,7 +31,7 @@ void cmXCode21Object::PrintComment(std::ostream& out)
cmSystemTools::ReplaceString(this->Comment, "\"", "");
}
}
- out << "/* ";
+ out << " /* ";
out << this->Comment;
out << " */";
}
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 72d8e99..e41f282 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -98,7 +98,7 @@ void cmXCodeObject::Print(std::ostream& out)
separator = " ";
indentFactor = 0;
}
- out << this->Id << " ";
+ out << this->Id;
if(!(this->IsA == PBXGroup && this->Comment.size() == 0))
{
this->PrintComment(out);
@@ -129,7 +129,7 @@ void cmXCodeObject::Print(std::ostream& out)
for(unsigned int k = 0; k < i->second->List.size(); k++)
{
cmXCodeObject::Indent(4*indentFactor, out);
- out << i->second->List[k]->Id << " ";
+ out << i->second->List[k]->Id;
i->second->List[k]->PrintComment(out);
out << "," << separator;
}
@@ -192,7 +192,6 @@ void cmXCodeObject::Print(std::ostream& out)
out << " = " << object->Object->Id;
if(object->Object->HasComment() && i->first != "remoteGlobalIDString")
{
- out << " ";
object->Object->PrintComment(out);
}
out << ";" << separator;
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bd2544b25655b6e20e5098a5f4cdd973288c106
commit 4bd2544b25655b6e20e5098a5f4cdd973288c106
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Tue Apr 7 22:00:29 2015 +0200
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Fri Apr 17 21:50:04 2015 +0200
Xcode: Do not add whitespace after attribute group opening brace
This suppresses the extra space that would be generated if the
separator is a space. The conditional block is also used in this
form elsewhere.
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 519545a..72d8e99 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -139,7 +139,11 @@ void cmXCodeObject::Print(std::ostream& out)
else if(object->TypeValue == ATTRIBUTE_GROUP)
{
std::map<std::string, cmXCodeObject*>::iterator j;
- out << i->first << " = {" << separator;
+ out << i->first << " = {";
+ if(separator == "\n")
+ {
+ out << separator;
+ }
for(j = object->ObjectAttributes.begin(); j !=
object->ObjectAttributes.end(); ++j)
{
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cb4c8380d9a0f5922a2eed60f6a1fd1274e9141
commit 5cb4c8380d9a0f5922a2eed60f6a1fd1274e9141
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Tue Apr 7 20:47:10 2015 +0200
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Fri Apr 17 21:50:04 2015 +0200
Xcode: Properly indent PBXFileReference and PBXBuildFile
Move indent factor change behind indention of start-of-line.
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 33ce8cc..519545a 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -91,13 +91,13 @@ void cmXCodeObject::Print(std::ostream& out)
{
std::string separator = "\n";
int indentFactor = 1;
+ cmXCodeObject::Indent(2*indentFactor, out);
if(this->Version > 15
&& (this->IsA == PBXFileReference || this->IsA == PBXBuildFile))
{
separator = " ";
indentFactor = 0;
}
- cmXCodeObject::Indent(2*indentFactor, out);
out << this->Id << " ";
if(!(this->IsA == PBXGroup && this->Comment.size() == 0))
{
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a723427b6450c1ec77226fb58aa3070a341891a2
commit a723427b6450c1ec77226fb58aa3070a341891a2
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Tue Apr 7 19:20:54 2015 +0200
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Fri Apr 17 21:50:04 2015 +0200
Xcode: Remove extra space in PBXProject comment
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 2e13692..4d98359 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3386,7 +3386,7 @@ bool cmGlobalXCodeGenerator
}
configlist->AddAttribute("buildConfigurations", buildConfigurations);
- std::string comment = "Build configuration list for PBXProject ";
+ std::string comment = "Build configuration list for PBXProject";
comment += " \"";
comment += this->CurrentProject;
comment += "\"";
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2fe8bca58089fb03f0ffa16792cc15fb741bd22c
commit 2fe8bca58089fb03f0ffa16792cc15fb741bd22c
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Tue Apr 7 19:19:00 2015 +0200
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Fri Apr 17 21:50:04 2015 +0200
Xcode: Add comment after root object
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index be40c66..2e13692 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3756,7 +3756,8 @@ cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
cmXCodeObject::PrintList(this->XCodeObjects, fout);
}
cmXCodeObject::Indent(1, fout);
- fout << "rootObject = " << this->RootObject->GetId() << ";\n";
+ fout << "rootObject = " << this->RootObject->GetId()
+ << " /* Project object */;\n";
fout << "}\n";
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e0e205e28922c6584a35ce6ec9966485df47b0d
commit 2e0e205e28922c6584a35ce6ec9966485df47b0d
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Tue Apr 7 19:13:57 2015 +0200
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Fri Apr 17 21:50:04 2015 +0200
Xcode: Indent using tabs
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 5a90fd9..33ce8cc 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -81,7 +81,7 @@ void cmXCodeObject::Indent(int level, std::ostream& out)
{
while(level)
{
- out << " ";
+ out << "\t";
level--;
}
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b68c8df6b78951e6d04eea62c3d5cc056796993
commit 7b68c8df6b78951e6d04eea62c3d5cc056796993
Author: Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Tue Apr 7 19:14:52 2015 +0200
Commit: Gregor Jasny <gjasny at googlemail.com>
CommitDate: Fri Apr 17 21:49:05 2015 +0200
Xcode: Sort Xcode objects by Id
this patch series aims to minimize deltas between the CMake Xcode
generator and Xcode itself. It was started by the observation that
if one makes any change to the project within Xcode (e.g. to see
how a variable is called internally) the user cannot diff the CMake
project and the one stored by Xcode afterwards.
Xcode keeps the objects ordered by the object id.
Because cmake stores them into an unordered container
at creation time they must be sorted before writing the
pbxproj file.
I tested this series with Xcode 6.3 and Xcode 3.2. Both show a
reduced diff after this series was applied.
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 0561a05..be40c66 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -592,6 +592,20 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
}
//----------------------------------------------------------------------------
+
+static bool objectIdLessThan(cmXCodeObject* l, cmXCodeObject* r)
+{
+ return l->GetId() < r->GetId();
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalXCodeGenerator::SortXCodeObjects()
+{
+ std::sort(this->XCodeObjects.begin(), this->XCodeObjects.end(),
+ objectIdLessThan);
+}
+
+//----------------------------------------------------------------------------
void cmGlobalXCodeGenerator::ClearXCodeObjects()
{
this->TargetDoneSet.clear();
@@ -3713,6 +3727,8 @@ cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
cmLocalGenerator* ,
std::vector<cmLocalGenerator*>& )
{
+ SortXCodeObjects();
+
fout << "// !$*UTF8*$!\n";
fout << "{\n";
cmXCodeObject::Indent(1, fout);
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index b272f6a..1a69fce 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -150,6 +150,7 @@ private:
cmXCodeObject* buildSettings,
const std::string& buildType);
std::string ExtractFlag(const char* flag, std::string& flags);
+ void SortXCodeObjects();
// delete all objects in the this->XCodeObjects vector.
void ClearXCodeObjects();
bool CreateXCodeObjects(cmLocalGenerator* root,
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalXCodeGenerator.cxx | 21 +++++++++++++++++--
Source/cmGlobalXCodeGenerator.h | 1 +
Source/cmXCode21Object.cxx | 6 +++++-
Source/cmXCodeObject.cxx | 22 ++++++++++----------
.../XcodeProject/XcodeFileType-check.cmake | 4 ++--
5 files changed, 38 insertions(+), 16 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list