summaryrefslogtreecommitdiffstats
path: root/Source/cmXCodeObject.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2007-08-14 15:45:15 (GMT)
committerDavid Cole <david.cole@kitware.com>2007-08-14 15:45:15 (GMT)
commitfa61182de8a6ce967420077417b5253abdba2d56 (patch)
treecc61c3f8b9d2d03ed8716d1e5590f0ad9e3f5b81 /Source/cmXCodeObject.cxx
parentf13c3eef83af130396d6c933afcbac672afe37a3 (diff)
downloadCMake-fa61182de8a6ce967420077417b5253abdba2d56.zip
CMake-fa61182de8a6ce967420077417b5253abdba2d56.tar.gz
CMake-fa61182de8a6ce967420077417b5253abdba2d56.tar.bz2
ENH: Improvements to the Xcode generator. Build frameworks using native Copy Headers and Copy Bundle Resources phases. Fix bugs: eliminate folders with no names, ensure source files show up in multiple targets, remove empty utility targets from Sources subtrees, ensure that fileRefs only show up once in each grouping folder.
Diffstat (limited to 'Source/cmXCodeObject.cxx')
-rw-r--r--Source/cmXCodeObject.cxx34
1 files changed, 31 insertions, 3 deletions
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 76a01b2..6cfb87b 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -17,6 +17,7 @@
#include "cmXCodeObject.h"
#include "cmSystemTools.h"
+//----------------------------------------------------------------------------
const char* cmXCodeObject::PBXTypeNames[] = {
"PBXGroup", "PBXBuildStyle", "PBXProject", "PBXHeadersBuildPhase",
"PBXSourcesBuildPhase", "PBXFrameworksBuildPhase", "PBXNativeTarget",
@@ -30,12 +31,12 @@ const char* cmXCodeObject::PBXTypeNames[] = {
"None"
};
+//----------------------------------------------------------------------------
cmXCodeObject::~cmXCodeObject()
{
this->Version = 15;
}
-
//----------------------------------------------------------------------------
cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
{
@@ -143,7 +144,33 @@ void cmXCodeObject::Print(std::ostream& out)
object->ObjectAttributes.end(); ++j)
{
cmXCodeObject::Indent(4 *indentFactor, out);
- out << j->first << " = " << j->second->String << ";";
+
+ if(j->second->TypeValue == STRING)
+ {
+ out << j->first << " = " << j->second->String << ";";
+ }
+ else if(j->second->TypeValue == OBJECT_LIST)
+ {
+ out << j->first << " = (";
+ for(unsigned int k = 0; k < j->second->List.size(); k++)
+ {
+ if(j->second->List[k]->TypeValue == STRING)
+ {
+ out << j->second->List[k]->String << ", ";
+ }
+ else
+ {
+ out << "List_" << k << "_TypeValue_IS_NOT_STRING, ";
+ }
+ }
+ out << ");";
+ }
+ else
+ {
+ out << j->first << " = error_unexpected_TypeValue_" <<
+ j->second->TypeValue << ";";
+ }
+
out << separator;
}
cmXCodeObject::Indent(3 *indentFactor, out);
@@ -189,7 +216,7 @@ void cmXCodeObject::PrintList(std::vector<cmXCodeObject*> const& objs,
out << "};\n";
}
-
+//----------------------------------------------------------------------------
void cmXCodeObject::CopyAttributes(cmXCodeObject* copy)
{
this->ObjectAttributes = copy->ObjectAttributes;
@@ -198,6 +225,7 @@ void cmXCodeObject::CopyAttributes(cmXCodeObject* copy)
this->Object = copy->Object;
}
+//----------------------------------------------------------------------------
void cmXCodeObject::SetString(const char* s)
{
std::string ss = s;