diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp index ebb2c0201e..10c5be6833 100644 --- a/Source/MFCDialog/CMakeSetupDialog.cpp +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -773,6 +773,7 @@ void CMakeSetupDialog::OnOk() { m_CacheEntriesList.ClearDirty(); this->RunCMake(true); + cmMakefileGenerator::UnRegisterGenerators(); CDialog::OnOK(); } diff --git a/Source/cmMakefileGenerator.cxx b/Source/cmMakefileGenerator.cxx index 18d86c5fe8..525d152d11 100644 --- a/Source/cmMakefileGenerator.cxx +++ b/Source/cmMakefileGenerator.cxx @@ -52,7 +52,7 @@ void cmMakefileGenerator::SetMakefile(cmMakefile* mf) void cmMakefileGenerator::UnRegisterGenerators() { - for(std::map::iterator i + for(std::map::iterator i = s_RegisteredGenerators.begin(); i != s_RegisteredGenerators.end(); ++i) { diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 570dc6684d..aaafcfc172 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -131,7 +131,7 @@ inline bool operator==(std::string const& a, const char* b) { return (a==std::string(b)); } # endif // end CM_SGI_CC_720 -// use this class to shring the size of symbols in .o files +// use this class to shrink the size of symbols in .o files // std::string is really basic_string<....lots of stuff....> // when combined with a map or set, the symbols can be > 2000 chars! struct cmStdString : public std::string diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 96731daadf..b51f52ff0a 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -53,6 +53,11 @@ cmUnixMakefileGenerator::cmUnixMakefileGenerator() m_Recurse = false; } +cmUnixMakefileGenerator::~cmUnixMakefileGenerator() +{ +} + + void cmUnixMakefileGenerator::GenerateMakefile() { // suppoirt override in output directories diff --git a/Source/cmUnixMakefileGenerator.h b/Source/cmUnixMakefileGenerator.h index 03439516a9..cce773a189 100644 --- a/Source/cmUnixMakefileGenerator.h +++ b/Source/cmUnixMakefileGenerator.h @@ -56,6 +56,8 @@ public: ///! Set cache only and recurse to false by default. cmUnixMakefileGenerator(); + ~cmUnixMakefileGenerator(); + ///! Get the name for the generator. virtual const char* GetName() {return "Unix Makefiles";} diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index bcc250f93e..3df3d6496d 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -1,4 +1,5 @@ #include "cmake.h" +#include "cmMakefileGenerator.h" int main(int ac, char** av) { @@ -8,5 +9,7 @@ int main(int ac, char** av) { args.push_back(av[i]); } - return cm.Generate(args); + int ret = cm.Generate(args); + cmMakefileGenerator::UnRegisterGenerators(); + return ret; }