summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx20
1 files changed, 1 insertions, 19 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index db44531..64cf92d 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -303,25 +303,7 @@ void cmCTestScriptHandler::CreateCMake()
// remove all cmake commands which are not scriptable, since they can't be
// used in ctest scripts
- std::vector<std::string> unscriptableCommands;
- cmake::RegisteredCommandsMap* commands = this->CMake->GetCommands();
- for (cmake::RegisteredCommandsMap::const_iterator pos = commands->begin();
- pos != commands->end();
- ++pos)
- {
- if (!pos->second->IsScriptable())
- {
- unscriptableCommands.push_back(pos->first);
- }
- }
-
- for(std::vector<std::string>::const_iterator it=unscriptableCommands.begin();
- it != unscriptableCommands.end();
- ++it)
- {
-// fprintf(stderr, "Removing %s\n", it->c_str());
- this->CMake->RemoveCommand(it->c_str());
- }
+ this->CMake->RemoveUnscriptableCommands();
// add any ctest specific commands, probably should have common superclass
// for ctest commands to clean this up. If a couple more commands are