From 5b40a872dd2d50e2c72c76df79ce087403daa37d Mon Sep 17 00:00:00 2001 From: Gabor Bencze Date: Sun, 4 Aug 2019 17:13:14 +0200 Subject: cmCommand refactor: cmMakeDirectoryCommand --- Source/cmMakeDirectoryCommand.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Source/cmMakeDirectoryCommand.cxx') diff --git a/Source/cmMakeDirectoryCommand.cxx b/Source/cmMakeDirectoryCommand.cxx index aff4ca650f..cdde6f9904 100644 --- a/Source/cmMakeDirectoryCommand.cxx +++ b/Source/cmMakeDirectoryCommand.cxx @@ -2,23 +2,22 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMakeDirectoryCommand.h" +#include "cmExecutionStatus.h" #include "cmMakefile.h" #include "cmSystemTools.h" -class cmExecutionStatus; - // cmMakeDirectoryCommand -bool cmMakeDirectoryCommand::InitialPass(std::vector const& args, - cmExecutionStatus&) +bool cmMakeDirectoryCommand(std::vector const& args, + cmExecutionStatus& status) { if (args.size() != 1) { - this->SetError("called with incorrect number of arguments"); + status.SetError("called with incorrect number of arguments"); return false; } - if (!this->Makefile->CanIWriteThisFile(args[0])) { + if (!status.GetMakefile().CanIWriteThisFile(args[0])) { std::string e = "attempted to create a directory: " + args[0] + " into a source directory."; - this->SetError(e); + status.SetError(e); cmSystemTools::SetFatalErrorOccured(); return false; } -- cgit v1.2.1