summaryrefslogtreecommitdiffstats
path: root/Source/cmXCode21Object.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-11-16 18:13:39 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-11-16 18:13:39 (GMT)
commit8b7091a0a6a056278f17a57b96c4694b43dc7bbb (patch)
tree216ffff95de69f389a54797b6b296040a18391d3 /Source/cmXCode21Object.cxx
parent7a1745b84bb5c3c9325b17e3a346b9a79f227efc (diff)
downloadCMake-8b7091a0a6a056278f17a57b96c4694b43dc7bbb.zip
CMake-8b7091a0a6a056278f17a57b96c4694b43dc7bbb.tar.gz
CMake-8b7091a0a6a056278f17a57b96c4694b43dc7bbb.tar.bz2
ENH: fixes for xcode21 and build styles and comments in the generated project
Diffstat (limited to 'Source/cmXCode21Object.cxx')
-rw-r--r--Source/cmXCode21Object.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx
index 84a2bd0..43db6d1 100644
--- a/Source/cmXCode21Object.cxx
+++ b/Source/cmXCode21Object.cxx
@@ -1,14 +1,27 @@
#include "cmXCode21Object.h"
+#include "cmSystemTools.h"
cmXCode21Object::cmXCode21Object(PBXType ptype, Type type)
:cmXCodeObject(ptype, type)
{
+ m_Version = 21;
}
//----------------------------------------------------------------------------
void cmXCode21Object::PrintComment(std::ostream& out)
{
- out << "/* */";
+ if(m_Comment.size() == 0)
+ {
+ cmXCodeObject* n = this->GetObject("name");
+ if(n)
+ {
+ m_Comment = n->GetString();
+ cmSystemTools::ReplaceString(m_Comment, "\"", "");
+ }
+ }
+ out << "/* ";
+ out << m_Comment;
+ out << " */";
}
@@ -29,7 +42,7 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v, std::ostre
{
return;
}
- out << "/* Begin " << PBXTypeNames[t] << " section */\n";
+ out << "\n/* Begin " << PBXTypeNames[t] << " section */\n";
for(std::vector<cmXCodeObject*>::const_iterator i = v.begin();
i != v.end(); ++i)
{
@@ -56,9 +69,9 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v, std::ostre
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXHeadersBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXNativeTarget);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXProject);
- cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXSourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXShellScriptBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXResourcesBuildPhase);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXSourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXApplicationReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXExecutableFileReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryReference);