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.
This commit is contained in:
Daniel Pfeifer
2016-12-26 10:38:36 +01:00
committed by Regina Pfeifer
parent 82aa6941e9
commit 1eebc29563
14 changed files with 53 additions and 45 deletions

View File

@@ -55,7 +55,7 @@ bool cmForEachFunctionBlocker::IsFunctionBlocked(const cmListFileFunction& lff,
// set the variable to the loop value
mf.AddDefinition(this->Args[0], arg.c_str());
// Invoke all the functions that were collected in the block.
cmExecutionStatus status;
cmExecutionStatus status(mf);
for (cmListFileFunction const& func : this->Functions) {
status.Clear();
mf.ExecuteCommand(func, status);