summaryrefslogtreecommitdiffstats
path: root/Source/cmFunctionCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r--Source/cmFunctionCommand.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index 610f516..f130e8d 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -5,6 +5,7 @@
#include <sstream>
#include <utility>
+#include "cm_memory.hxx"
#include "cm_static_string_view.hxx"
#include "cm_string_view.hxx"
@@ -18,6 +19,7 @@
#include "cmState.h"
#include "cmStringAlgorithms.h"
+namespace {
// define the class for function commands
class cmFunctionHelperCommand
{
@@ -34,6 +36,7 @@ public:
cmPolicies::PolicyMap Policies;
std::string FilePath;
};
+}
bool cmFunctionHelperCommand::operator()(
std::vector<cmListFileArgument> const& args,
@@ -145,11 +148,11 @@ bool cmFunctionFunctionBlocker::Replay(
return true;
}
-bool cmFunctionCommand::InitialPass(std::vector<std::string> const& args,
- cmExecutionStatus&)
+bool cmFunctionCommand(std::vector<std::string> 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;
}
@@ -157,7 +160,7 @@ bool cmFunctionCommand::InitialPass(std::vector<std::string> const& args,
{
auto fb = cm::make_unique<cmFunctionFunctionBlocker>();
cmAppend(fb->Args, args);
- this->Makefile->AddFunctionBlocker(std::move(fb));
+ status.GetMakefile().AddFunctionBlocker(std::move(fb));
}
return true;
}