summaryrefslogtreecommitdiffstats
path: root/Source/cmCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCommand.cxx')
-rw-r--r--Source/cmCommand.cxx25
1 files changed, 2 insertions, 23 deletions
diff --git a/Source/cmCommand.cxx b/Source/cmCommand.cxx
index 181b412..d349c91 100644
--- a/Source/cmCommand.cxx
+++ b/Source/cmCommand.cxx
@@ -3,7 +3,6 @@
#include "cmCommand.h"
#include "cmMakefile.h"
-#include "cmake.h"
class cmExecutionStatus;
struct cmListFileArgument;
@@ -23,32 +22,12 @@ bool cmCommand::InvokeInitialPass(const std::vector<cmListFileArgument>& args,
const char* cmCommand::GetError()
{
if (this->Error.empty()) {
- this->Error = this->GetName();
- this->Error += " unknown error.";
+ return "unknown error.";
}
return this->Error.c_str();
}
void cmCommand::SetError(const std::string& e)
{
- this->Error = this->GetName();
- this->Error += " ";
- this->Error += e;
-}
-
-bool cmCommand::Disallowed(cmPolicies::PolicyID pol, const char* e)
-{
- switch (this->Makefile->GetPolicyStatus(pol)) {
- case cmPolicies::WARN:
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
- cmPolicies::GetPolicyWarning(pol));
- case cmPolicies::OLD:
- return false;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- case cmPolicies::NEW:
- this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
- break;
- }
- return true;
+ this->Error = e;
}