summaryrefslogtreecommitdiffstats
path: root/Source/cmWhileCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmWhileCommand.cxx')
-rw-r--r--Source/cmWhileCommand.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx
index 434c298..37d1c74 100644
--- a/Source/cmWhileCommand.cxx
+++ b/Source/cmWhileCommand.cxx
@@ -11,6 +11,7 @@
#include "cmMessageType.h"
#include "cmSystemTools.h"
+#include <string>
#include <utility>
cmWhileFunctionBlocker::cmWhileFunctionBlocker(cmMakefile* mf)
@@ -129,19 +130,20 @@ bool cmWhileFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
return false;
}
-bool cmWhileCommand::InvokeInitialPass(
- const std::vector<cmListFileArgument>& args, cmExecutionStatus&)
+bool cmWhileCommand(std::vector<cmListFileArgument> const& args,
+ cmExecutionStatus& status)
{
if (args.empty()) {
- this->SetError("called with incorrect number of arguments");
+ status.SetError("called with incorrect number of arguments");
return false;
}
// create a function blocker
{
- auto fb = cm::make_unique<cmWhileFunctionBlocker>(this->Makefile);
+ cmMakefile& makefile = status.GetMakefile();
+ auto fb = cm::make_unique<cmWhileFunctionBlocker>(&makefile);
fb->Args = args;
- this->Makefile->AddFunctionBlocker(std::move(fb));
+ makefile.AddFunctionBlocker(std::move(fb));
}
return true;
}