summaryrefslogtreecommitdiff
path: root/Source/cmXCode21Object.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-09-02 16:29:32 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2005-09-02 16:29:32 -0400
commit6b4c142c7dfe60e7e9b5cccfc4e44ae808b54b75 (patch)
treeb25e19e52ff57671a63be2fb5f76e0dc87dd2995 /Source/cmXCode21Object.cxx
parent389333967b157e40b6846c964699a13ab5ba6c99 (diff)
downloadcmake-6b4c142c7dfe60e7e9b5cccfc4e44ae808b54b75.tar.gz
ENH: add real support for Xcode21
Diffstat (limited to 'Source/cmXCode21Object.cxx')
-rw-r--r--Source/cmXCode21Object.cxx72
1 files changed, 72 insertions, 0 deletions
diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx
new file mode 100644
index 0000000000..84a2bd0e0d
--- /dev/null
+++ b/Source/cmXCode21Object.cxx
@@ -0,0 +1,72 @@
+#include "cmXCode21Object.h"
+
+cmXCode21Object::cmXCode21Object(PBXType ptype, Type type)
+ :cmXCodeObject(ptype, type)
+{
+}
+
+//----------------------------------------------------------------------------
+void cmXCode21Object::PrintComment(std::ostream& out)
+{
+ out << "/* */";
+}
+
+
+void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v, std::ostream& out, PBXType t)
+{
+ bool hasOne = false;
+ for(std::vector<cmXCodeObject*>::const_iterator i = v.begin();
+ i != v.end(); ++i)
+ {
+ cmXCodeObject* obj = *i;
+ if(obj->GetType() == OBJECT && obj->GetIsA() == t)
+ {
+ hasOne = true;
+ break;
+ }
+ }
+ if(!hasOne)
+ {
+ return;
+ }
+ out << "/* Begin " << PBXTypeNames[t] << " section */\n";
+ for(std::vector<cmXCodeObject*>::const_iterator i = v.begin();
+ i != v.end(); ++i)
+ {
+ cmXCodeObject* obj = *i;
+ if(obj->GetType() == OBJECT && obj->GetIsA() == t)
+ {
+ obj->Print(out);
+ }
+ }
+ out << "/* End " << PBXTypeNames[t] << " section */\n";
+}
+
+void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v, std::ostream& out)
+{
+ cmXCodeObject::Indent(1, out);
+ out << "objects = {\n";
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXAggregateTarget);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXBuildFile);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXBuildStyle);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXContainerItemProxy);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFileReference);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFrameworksBuildPhase);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXGroup);
+ 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::PBXApplicationReference);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXExecutableFileReference);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryReference);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXToolTarget);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryTarget);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXTargetDependency);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::XCBuildConfiguration);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::XCConfigurationList);
+ cmXCodeObject::Indent(1, out);
+ out << "};\n";
+}