diff options
author | Gabor Bencze <b.gabor98@gmail.com> | 2019-08-04 15:13:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-20 18:42:19 (GMT) |
commit | 5b40a872dd2d50e2c72c76df79ce087403daa37d (patch) | |
tree | 83c30e9b3c202fefb383c4811a2d7640f6ba6a36 /Source/cmMakeDirectoryCommand.cxx | |
parent | e0b7ff4af2a8f5a2c2f746c0976cd22367212c8a (diff) | |
download | CMake-5b40a872dd2d50e2c72c76df79ce087403daa37d.zip CMake-5b40a872dd2d50e2c72c76df79ce087403daa37d.tar.gz CMake-5b40a872dd2d50e2c72c76df79ce087403daa37d.tar.bz2 |
cmCommand refactor: cmMakeDirectoryCommand
Diffstat (limited to 'Source/cmMakeDirectoryCommand.cxx')
-rw-r--r-- | Source/cmMakeDirectoryCommand.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmMakeDirectoryCommand.cxx b/Source/cmMakeDirectoryCommand.cxx index aff4ca6..cdde6f9 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<std::string> const& args, - cmExecutionStatus&) +bool cmMakeDirectoryCommand(std::vector<std::string> 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; } |