add support for clean up

This commit is contained in:
Bill Hoffman 2001-09-14 15:18:01 -04:00
parent c3478f749a
commit 58a3e38167
2 changed files with 13 additions and 0 deletions

View File

@ -50,6 +50,17 @@ void cmMakefileGenerator::SetMakefile(cmMakefile* mf)
m_Makefile = mf;
}
void cmMakefileGenerator::UnRegisterGenerators()
{
for(std::map<cmStdString, cmMakefileGenerator*>::iterator i
= s_RegisteredGenerators.begin();
i != s_RegisteredGenerators.end(); ++i)
{
delete i->second;
}
s_RegisteredGenerators = std::map<cmStdString, cmMakefileGenerator*>();
}
void cmMakefileGenerator::GetRegisteredGenerators(std::vector<std::string>& names)
{
for(std::map<cmStdString, cmMakefileGenerator*>::iterator i

View File

@ -59,6 +59,8 @@ public:
static cmMakefileGenerator* CreateGenerator(const char* name);
///! Register a generator
static void RegisterGenerator(cmMakefileGenerator*);
///! delete all registered generators, useful for clean up
static void UnRegisterGenerators();
///! Get the names of the current registered generators
static void GetRegisteredGenerators(std::vector<std::string>& names);