add support for clean up
This commit is contained in:
parent
c3478f749a
commit
58a3e38167
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue