summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-24 14:20:50 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-24 14:20:50 (GMT)
commit92be048b7f40f4ca352bc0ef85c8e1bf4dfc0702 (patch)
tree24406d6b616f0a17fb97d831e7ec6c2456fa4a2e
parent21f449214d9bf4c8fa99b3a90029cff2171e3fac (diff)
parentc401f95888938562881cd5d7c21ccea5974fe130 (diff)
downloadCMake-92be048b7f40f4ca352bc0ef85c8e1bf4dfc0702.zip
CMake-92be048b7f40f4ca352bc0ef85c8e1bf4dfc0702.tar.gz
CMake-92be048b7f40f4ca352bc0ef85c8e1bf4dfc0702.tar.bz2
Merge topic 'cmcommand-no-disable'
c401f958 Remove cmCommand::Enabled and all related accessors
-rw-r--r--Source/cmCommand.h24
-rw-r--r--Source/cmMakefile.cxx2
2 files changed, 2 insertions, 24 deletions
diff --git a/Source/cmCommand.h b/Source/cmCommand.h
index 65bb7c5..b263a61 100644
--- a/Source/cmCommand.h
+++ b/Source/cmCommand.h
@@ -23,11 +23,10 @@ class cmCommand
{
public:
/**
- * Construct the command. By default it is enabled with no makefile.
+ * Construct the command. By default it has no makefile.
*/
cmCommand()
: Makefile(CM_NULLPTR)
- , Enabled(true)
{
}
@@ -92,26 +91,6 @@ public:
virtual std::string GetName() const = 0;
/**
- * Enable the command.
- */
- void EnabledOn() { this->Enabled = true; }
-
- /**
- * Disable the command.
- */
- void EnabledOff() { this->Enabled = false; }
-
- /**
- * Query whether the command is enabled.
- */
- bool GetEnabled() const { return this->Enabled; }
-
- /**
- * Disable or enable the command.
- */
- void SetEnabled(bool enabled) { this->Enabled = enabled; }
-
- /**
* Return the last error string.
*/
const char* GetError();
@@ -129,7 +108,6 @@ protected:
cmCommandArgumentsHelper Helper;
private:
- bool Enabled;
std::string Error;
};
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 00c0e82..741ffb8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -266,7 +266,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
pcmd->SetMakefile(this);
// Decide whether to invoke the command.
- if (pcmd->GetEnabled() && !cmSystemTools::GetFatalErrorOccured() &&
+ if (!cmSystemTools::GetFatalErrorOccured() &&
(this->GetCMakeInstance()->GetWorkingMode() != cmake::SCRIPT_MODE ||
pcmd->IsScriptable()))