mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 09:29:15 -05:00
cmState: remove RemoveUnscriptableCommands
This commit is contained in:
@@ -23,7 +23,6 @@
|
|||||||
#include "cmDocumentationEntry.h"
|
#include "cmDocumentationEntry.h"
|
||||||
#include "cmGlobalGenerator.h"
|
#include "cmGlobalGenerator.h"
|
||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
#include "cmState.h"
|
|
||||||
#include "cmStateSnapshot.h"
|
#include "cmStateSnapshot.h"
|
||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
#include "cm_auto_ptr.hxx"
|
#include "cm_auto_ptr.hxx"
|
||||||
@@ -193,7 +192,6 @@ int main(int argc, char const* const* argv)
|
|||||||
cminst.SetHomeDirectory("");
|
cminst.SetHomeDirectory("");
|
||||||
cminst.SetHomeOutputDirectory("");
|
cminst.SetHomeOutputDirectory("");
|
||||||
cminst.GetCurrentSnapshot().SetDefaultDefinitions();
|
cminst.GetCurrentSnapshot().SetDefaultDefinitions();
|
||||||
cminst.GetState()->RemoveUnscriptableCommands();
|
|
||||||
cmGlobalGenerator cmgg(&cminst);
|
cmGlobalGenerator cmgg(&cminst);
|
||||||
CM_AUTO_PTR<cmMakefile> globalMF(
|
CM_AUTO_PTR<cmMakefile> globalMF(
|
||||||
new cmMakefile(&cmgg, cminst.GetCurrentSnapshot()));
|
new cmMakefile(&cmgg, cminst.GetCurrentSnapshot()));
|
||||||
|
|||||||
@@ -290,10 +290,6 @@ void cmCTestScriptHandler::CreateCMake()
|
|||||||
|
|
||||||
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
|
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
|
||||||
|
|
||||||
// remove all cmake commands which are not scriptable, since they can't be
|
|
||||||
// used in ctest scripts
|
|
||||||
this->CMake->GetState()->RemoveUnscriptableCommands();
|
|
||||||
|
|
||||||
// add any ctest specific commands, probably should have common superclass
|
// add any ctest specific commands, probably should have common superclass
|
||||||
// for ctest commands to clean this up. If a couple more commands are
|
// for ctest commands to clean this up. If a couple more commands are
|
||||||
// created with the same format lets do that - ken
|
// created with the same format lets do that - ken
|
||||||
|
|||||||
@@ -410,21 +410,6 @@ void cmState::AddCommand(cmCommand* command)
|
|||||||
this->Commands.insert(std::make_pair(name, command));
|
this->Commands.insert(std::make_pair(name, command));
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmState::RemoveUnscriptableCommands()
|
|
||||||
{
|
|
||||||
std::vector<std::string> unscriptableCommands;
|
|
||||||
for (std::map<std::string, cmCommand*>::iterator pos =
|
|
||||||
this->Commands.begin();
|
|
||||||
pos != this->Commands.end();) {
|
|
||||||
if (!pos->second->IsScriptable()) {
|
|
||||||
delete pos->second;
|
|
||||||
this->Commands.erase(pos++);
|
|
||||||
} else {
|
|
||||||
++pos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cmCommand* cmState::GetCommand(std::string const& name) const
|
cmCommand* cmState::GetCommand(std::string const& name) const
|
||||||
{
|
{
|
||||||
cmCommand* command = CM_NULLPTR;
|
cmCommand* command = CM_NULLPTR;
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ public:
|
|||||||
|
|
||||||
cmCommand* GetCommand(std::string const& name) const;
|
cmCommand* GetCommand(std::string const& name) const;
|
||||||
void AddCommand(cmCommand* command);
|
void AddCommand(cmCommand* command);
|
||||||
void RemoveUnscriptableCommands();
|
|
||||||
void RenameCommand(std::string const& oldName, std::string const& newName);
|
void RenameCommand(std::string const& oldName, std::string const& newName);
|
||||||
void RemoveUserDefinedCommands();
|
void RemoveUserDefinedCommands();
|
||||||
std::vector<std::string> GetCommandNames() const;
|
std::vector<std::string> GetCommandNames() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user