diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-09-14 19:18:01 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-09-14 19:18:01 (GMT) |
commit | 58a3e38167e01834c50343777c9223fa233de62e (patch) | |
tree | d0d2bac128d718e9acfd5d37d2a745c74b0c7fc1 | |
parent | c3478f749a0e0b08beba803667126950cc72c0da (diff) | |
download | CMake-58a3e38167e01834c50343777c9223fa233de62e.zip CMake-58a3e38167e01834c50343777c9223fa233de62e.tar.gz CMake-58a3e38167e01834c50343777c9223fa233de62e.tar.bz2 |
add support for clean up
-rw-r--r-- | Source/cmMakefileGenerator.cxx | 11 | ||||
-rw-r--r-- | Source/cmMakefileGenerator.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmMakefileGenerator.cxx b/Source/cmMakefileGenerator.cxx index a662029..18d86c5 100644 --- a/Source/cmMakefileGenerator.cxx +++ b/Source/cmMakefileGenerator.cxx @@ -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 diff --git a/Source/cmMakefileGenerator.h b/Source/cmMakefileGenerator.h index e2da856..7165562 100644 --- a/Source/cmMakefileGenerator.h +++ b/Source/cmMakefileGenerator.h @@ -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); |