summaryrefslogtreecommitdiff
path: root/Source/cmFunctionCommand.cxx
diff options
context:
space:
mode:
authorGabor Bencze <b.gabor98@gmail.com>2019-07-25 19:07:00 +0200
committerBrad King <brad.king@kitware.com>2019-08-20 14:42:19 -0400
commit9bbe95a0e71e6658a37fe9e755577c80ffa2da9c (patch)
tree543b82d34066fe72ff216255c5c55d02390685c4 /Source/cmFunctionCommand.cxx
parentcce3600e3f789f6f2984d61c925170f92b35ee7d (diff)
downloadcmake-9bbe95a0e71e6658a37fe9e755577c80ffa2da9c.tar.gz
cmCommand refactor: cmFunctionCommand
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 610f51671d..f130e8df2b 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;
}