diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-12-26 09:38:36 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-07-21 07:25:32 (GMT) |
commit | 1eebc2956321c2e7da00a5d35e207bedb899c804 (patch) | |
tree | a8c98c7349a686061cb035e8859e8925bc79c458 /Source/cmMakefile.cxx | |
parent | 82aa6941e9b292d95820b5723b4dcc8b70fbb417 (diff) | |
download | CMake-1eebc2956321c2e7da00a5d35e207bedb899c804.zip CMake-1eebc2956321c2e7da00a5d35e207bedb899c804.tar.gz CMake-1eebc2956321c2e7da00a5d35e207bedb899c804.tar.bz2 |
cmCommand: deprecate functions GetMakefile and SetError
Replace the members for the Makefile and the Error with a
cmExecutionStatus. Re-implement GetMakefile and SetError based on that.
Both functions should be called directly on the cmExecutionStatus that is
passed to InitialPass. This will help us make all Commands immutable and
remove the need for cloning.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 1723c5a..cb7e94b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -392,7 +392,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, this->GetState()->GetCommandByExactName(lff.Name.Lower)) { // Clone the prototype. std::unique_ptr<cmCommand> pcmd(proto->Clone()); - pcmd->SetMakefile(this); + pcmd->SetExecutionStatus(&status); // Decide whether to invoke the command. if (!cmSystemTools::GetFatalErrorOccured()) { @@ -407,7 +407,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, if (!hadNestedError) { // The command invocation requested that we report an error. std::string const error = - std::string(lff.Name.Original) + " " + pcmd->GetError(); + std::string(lff.Name.Original) + " " + status.GetError(); this->IssueMessage(MessageType::FATAL_ERROR, error); } result = false; @@ -657,7 +657,7 @@ void cmMakefile::ReadListFile(cmListFile const& listFile, // Run the parsed commands. const size_t numberFunctions = listFile.Functions.size(); for (size_t i = 0; i < numberFunctions; ++i) { - cmExecutionStatus status; + cmExecutionStatus status(*this); this->ExecuteCommand(listFile.Functions[i], status); if (cmSystemTools::GetFatalErrorOccured()) { break; |