summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2015-04-09 08:48:33 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2015-04-17 19:50:05 (GMT)
commita6331eb851c132d3d0496e738886ad76e13a92a0 (patch)
tree8a32172d36694634e8452e5d80d72d5b3ec8423f /Source
parent6e8952c19385acb0ff9f58c2a462d91dd0624e05 (diff)
downloadCMake-a6331eb851c132d3d0496e738886ad76e13a92a0.zip
CMake-a6331eb851c132d3d0496e738886ad76e13a92a0.tar.gz
CMake-a6331eb851c132d3d0496e738886ad76e13a92a0.tar.bz2
Xcode: Let PrintComment decide if the comment is non-empty
Diffstat (limited to 'Source')
-rw-r--r--Source/cmXCode21Object.cxx4
-rw-r--r--Source/cmXCodeObject.cxx5
2 files changed, 5 insertions, 4 deletions
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")
{