summaryrefslogtreecommitdiff
path: root/Source/cmCommand.h
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-10-20 00:29:18 +0200
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-10-21 18:14:51 +0200
commit6c9b3b5c03b41842d3d79c1bd80691be7e5c6f89 (patch)
tree2a3d630a70a3e5d6eeef5dc99847d51bcedd8589 /Source/cmCommand.h
parent8483dab8e16b9734ac7d2b90b95d474ce8502e40 (diff)
downloadcmake-6c9b3b5c03b41842d3d79c1bd80691be7e5c6f89.tar.gz
cmCommand: implement functions in cxx file
Diffstat (limited to 'Source/cmCommand.h')
-rw-r--r--Source/cmCommand.h48
1 files changed, 6 insertions, 42 deletions
diff --git a/Source/cmCommand.h b/Source/cmCommand.h
index d8e337dd69..9299c7128b 100644
--- a/Source/cmCommand.h
+++ b/Source/cmCommand.h
@@ -28,9 +28,9 @@ public:
* Construct the command. By default it is enabled with no makefile.
*/
cmCommand()
+ : Makefile(CM_NULLPTR)
+ , Enabled(true)
{
- this->Makefile = CM_NULLPTR;
- this->Enabled = true;
}
/**
@@ -50,16 +50,7 @@ public:
* arguments and then invokes the InitialPass.
*/
virtual bool InvokeInitialPass(const std::vector<cmListFileArgument>& args,
- cmExecutionStatus& status)
- {
- std::vector<std::string> expandedArguments;
- if (!this->Makefile->ExpandArguments(args, expandedArguments)) {
- // There was an error expanding arguments. It was already
- // reported, so we can skip this command without error.
- return true;
- }
- return this->InitialPass(expandedArguments, status);
- }
+ cmExecutionStatus& status);
/**
* This is called when the command is first encountered in
@@ -127,42 +118,15 @@ public:
/**
* Return the last error string.
*/
- const char* GetError()
- {
- if (this->Error.empty()) {
- this->Error = this->GetName();
- this->Error += " unknown error.";
- }
- return this->Error.c_str();
- }
+ const char* GetError();
/**
* Set the error message
*/
- void SetError(const std::string& e)
- {
- this->Error = this->GetName();
- this->Error += " ";
- this->Error += e;
- }
+ void SetError(const std::string& e);
/** Check if the command is disallowed by a policy. */
- bool 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;
- }
+ bool Disallowed(cmPolicies::PolicyID pol, const char* e);
protected:
cmMakefile* Makefile;