From bdfa41a4a6c0e87417bb5a0fc26edb2f42e08274 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Fri, 4 Oct 2002 11:42:16 -0400 Subject: [PATCH] updates --- Source/cmGlobalCodeWarriorGenerator.cxx | 7 ++++++ Source/cmLocalCodeWarriorGenerator.cxx | 33 +++++++++++++++++++++++++ Source/cmLocalCodeWarriorGenerator.h | 2 ++ 3 files changed, 42 insertions(+) diff --git a/Source/cmGlobalCodeWarriorGenerator.cxx b/Source/cmGlobalCodeWarriorGenerator.cxx index f0e51bcfb..0d6fb6df6 100644 --- a/Source/cmGlobalCodeWarriorGenerator.cxx +++ b/Source/cmGlobalCodeWarriorGenerator.cxx @@ -272,6 +272,13 @@ void cmGlobalCodeWarriorGenerator::WriteGroupList(std::ostream& fout) { fout << "\n"; + unsigned int i; + // for each local generator + for (i = 0; i < m_LocalGenerators.size(); ++i) + { + static_cast(m_LocalGenerators[i])->WriteGroups(fout); + } + fout << "\n"; } diff --git a/Source/cmLocalCodeWarriorGenerator.cxx b/Source/cmLocalCodeWarriorGenerator.cxx index b50ec15a2..574566823 100644 --- a/Source/cmLocalCodeWarriorGenerator.cxx +++ b/Source/cmLocalCodeWarriorGenerator.cxx @@ -116,3 +116,36 @@ void cmLocalCodeWarriorGenerator::WriteFileList(std::ostream& fout, } fout << "\n"; } + +void cmLocalCodeWarriorGenerator::WriteGroups(std::ostream& fout) +{ + cmTargets &tgts = m_Makefile->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); + l != tgts.end(); l++) + { + this->WriteGroup(fout,l->first.c_str(),&(l->second)); + } +} + +void cmLocalCodeWarriorGenerator::WriteGroup(std::ostream& fout, + const char *tgtName, + cmTarget const *l) +{ + fout << "" << tgtName << "\n"; + + // for each file + std::vector const& classes = l->GetSourceFiles(); + for(std::vector::const_iterator i = classes.begin(); + i != classes.end(); i++) + { + std::string source = (*i)->GetFullPath(); + fout << "\n"; + fout << "" << tgtName << "\n"; + fout << "Name\n"; + fout << "" << source << "\n"; + fout << "Generic\n"; + fout << "\n"; + } + + fout << "\n"; +} diff --git a/Source/cmLocalCodeWarriorGenerator.h b/Source/cmLocalCodeWarriorGenerator.h index 5987fb841..2cfe95996 100644 --- a/Source/cmLocalCodeWarriorGenerator.h +++ b/Source/cmLocalCodeWarriorGenerator.h @@ -57,9 +57,11 @@ public: void SetBuildType(BuildType,const char *name); void WriteTargets(std::ostream& fout); + void WriteGroups(std::ostream& fout); private: void WriteTarget(std::ostream& fout, const char *name, cmTarget const *l); + void WriteGroup(std::ostream& fout, const char *name, cmTarget const *l); void WriteSettingList(std::ostream& fout, const char *name, cmTarget const *l); void WriteFileList(std::ostream& fout, const char *name, cmTarget const *l);