diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-06-12 14:56:40 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-06-12 14:56:40 (GMT) |
commit | 6e28861c188316ead00c750cb71b130237179812 (patch) | |
tree | 428846ab608075cf053082dac91b6210ec7f3ec0 /Source/cmake.cxx | |
parent | c64447c3686e22389c406fe987271149150dd93d (diff) | |
download | CMake-6e28861c188316ead00c750cb71b130237179812.zip CMake-6e28861c188316ead00c750cb71b130237179812.tar.gz CMake-6e28861c188316ead00c750cb71b130237179812.tar.bz2 |
ENH: remove non/scriptable cmake commands from the script handler in ctest,
as discussed with David. This also gives a better ctest man page with just
the commands you should actually use in ctest scripts.
Until now these commands were more or less executed, but e.g. add_executable() didn't create an executable, project() failed with an
error. Now you get an error instantly if using one of these commands.
Alex
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 11 |
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()); |