diff options
author | Gabor Bencze <b.gabor98@gmail.com> | 2019-07-25 17:07:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-20 18:42:19 (GMT) |
commit | 9bbe95a0e71e6658a37fe9e755577c80ffa2da9c (patch) | |
tree | 543b82d34066fe72ff216255c5c55d02390685c4 /Source/cmFunctionCommand.cxx | |
parent | cce3600e3f789f6f2984d61c925170f92b35ee7d (diff) | |
download | CMake-9bbe95a0e71e6658a37fe9e755577c80ffa2da9c.zip CMake-9bbe95a0e71e6658a37fe9e755577c80ffa2da9c.tar.gz CMake-9bbe95a0e71e6658a37fe9e755577c80ffa2da9c.tar.bz2 |
cmCommand refactor: cmFunctionCommand
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r-- | Source/cmFunctionCommand.cxx | 11 |
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; } |