summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a040b55..664108e 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -260,6 +260,17 @@ void cmake::RenameCommand(const char*oldName, const char* newName)
this->Commands.erase(pos);
}
+void cmake::RemoveCommand(const char* name)
+{
+ std::string sName = cmSystemTools::LowerCase(name);
+ RegisteredCommandsMap::iterator pos = this->Commands.find(sName);
+ if ( pos != this->Commands.end() )
+ {
+ delete pos->second;
+ this->Commands.erase(pos);
+ }
+}
+
void cmake::AddCommand(cmCommand* wg)
{
std::string name = cmSystemTools::LowerCase(wg->GetName());