summaryrefslogtreecommitdiffstats
path: root/Source/cmMacroCommand.cxx
diff options
context:
space:
mode:
authorGabor Bencze <b.gabor98@gmail.com>2019-08-02 16:42:44 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-20 18:42:19 (GMT)
commit9ae9f3e77e375c143e5200624f12d15e2bba02d4 (patch)
tree4f2aa8905e8b84932de29357b4f48bfbb260ae93 /Source/cmMacroCommand.cxx
parentceab7bda44b06fc6fdb842b7a51ccc662c907fb9 (diff)
downloadCMake-9ae9f3e77e375c143e5200624f12d15e2bba02d4.zip
CMake-9ae9f3e77e375c143e5200624f12d15e2bba02d4.tar.gz
CMake-9ae9f3e77e375c143e5200624f12d15e2bba02d4.tar.bz2
cmCommand refactor: cmMacroCommand
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r--Source/cmMacroCommand.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index 8689c8f..bc3c3ac 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -21,6 +21,8 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
+namespace {
+
// define the class for macro commands
class cmMacroHelperCommand
{
@@ -178,12 +180,13 @@ bool cmMacroFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
mf.GetState()->AddScriptedCommand(this->Args[0], std::move(f));
return true;
}
+}
-bool cmMacroCommand::InitialPass(std::vector<std::string> const& args,
- cmExecutionStatus&)
+bool cmMacroCommand(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;
}
@@ -191,7 +194,7 @@ bool cmMacroCommand::InitialPass(std::vector<std::string> const& args,
{
auto fb = cm::make_unique<cmMacroFunctionBlocker>();
cmAppend(fb->Args, args);
- this->Makefile->AddFunctionBlocker(std::move(fb));
+ status.GetMakefile().AddFunctionBlocker(std::move(fb));
}
return true;
}