summaryrefslogtreecommitdiffstats
path: root/Source/cmCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-24 14:16:40 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-24 14:16:40 (GMT)
commitb899c0a92f6833c4996276d86d9e0fb3d42df77c (patch)
tree4a21fd3a3ac03ec9d5ae9a9acd9d7f7e0ee1af23 /Source/cmCommand.h
parent3d5ec790eea47a91c6f70d172c42839db02b8467 (diff)
parent569509f4bfbf44c67e237a01f957fdfe52223cfa (diff)
downloadCMake-b899c0a92f6833c4996276d86d9e0fb3d42df77c.zip
CMake-b899c0a92f6833c4996276d86d9e0fb3d42df77c.tar.gz
CMake-b899c0a92f6833c4996276d86d9e0fb3d42df77c.tar.bz2
Merge topic 'separate-compilation'
569509f4 Fix newly discovered clang-tidy issues 6c9b3b5c cmCommand: implement functions in cxx file 8483dab8 bootstrap: Sort source files lexicographically 4fb70919 Create all commands from a single function 608afd4f Separate compilation for commands included in cmBootstrapCommands2 64f9c282 Separate compilation for commands included in cmBootstrapCommands1 f69e768d Separate compilation for commands included in cmCommands
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 d8e337d..9299c71 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;