diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-10-04 11:42:16 -0400 |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-10-04 11:42:16 -0400 |
commit | bdfa41a4a6c0e87417bb5a0fc26edb2f42e08274 (patch) | |
tree | 32cadf967e12459cf4bc2806365e7b3bd63c898c | |
parent | 564074b06c909626b4e048daee25c40142a1ebee (diff) | |
download | cmake-bdfa41a4a6c0e87417bb5a0fc26edb2f42e08274.tar.gz |
updates
-rw-r--r-- | Source/cmGlobalCodeWarriorGenerator.cxx | 7 | ||||
-rw-r--r-- | Source/cmLocalCodeWarriorGenerator.cxx | 33 | ||||
-rw-r--r-- | Source/cmLocalCodeWarriorGenerator.h | 2 |
3 files changed, 42 insertions, 0 deletions
diff --git a/Source/cmGlobalCodeWarriorGenerator.cxx b/Source/cmGlobalCodeWarriorGenerator.cxx index f0e51bcfb8..0d6fb6df6d 100644 --- a/Source/cmGlobalCodeWarriorGenerator.cxx +++ b/Source/cmGlobalCodeWarriorGenerator.cxx @@ -272,6 +272,13 @@ void cmGlobalCodeWarriorGenerator::WriteGroupList(std::ostream& fout) { fout << "<GROUPLIST>\n"; + unsigned int i; + // for each local generator + for (i = 0; i < m_LocalGenerators.size(); ++i) + { + static_cast<cmLocalCodeWarriorGenerator *>(m_LocalGenerators[i])->WriteGroups(fout); + } + fout << "</GROUPLIST>\n"; } diff --git a/Source/cmLocalCodeWarriorGenerator.cxx b/Source/cmLocalCodeWarriorGenerator.cxx index b50ec15a2c..574566823d 100644 --- a/Source/cmLocalCodeWarriorGenerator.cxx +++ b/Source/cmLocalCodeWarriorGenerator.cxx @@ -116,3 +116,36 @@ void cmLocalCodeWarriorGenerator::WriteFileList(std::ostream& fout, } fout << "</FILELIST>\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 << "<GROUP><NAME>" << tgtName << "</NAME>\n"; + + // for each file + std::vector<cmSourceFile*> const& classes = l->GetSourceFiles(); + for(std::vector<cmSourceFile*>::const_iterator i = classes.begin(); + i != classes.end(); i++) + { + std::string source = (*i)->GetFullPath(); + fout << "<FILEREF>\n"; + fout << "<TARGETNAME>" << tgtName << "</TARGETNAME>\n"; + fout << "<PATHTYPE>Name</PATHTYPE>\n"; + fout << "<PATH>" << source << "</PATH>\n"; + fout << "<PATHFORMAT>Generic</PATHFORMAT>\n"; + fout << "</FILEREF>\n"; + } + + fout << "</GROUP>\n"; +} diff --git a/Source/cmLocalCodeWarriorGenerator.h b/Source/cmLocalCodeWarriorGenerator.h index 5987fb8412..2cfe959967 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); |