diff options
author | Brad King <brad.king@kitware.com> | 2019-08-22 14:23:35 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-08-22 14:25:09 (GMT) |
commit | 130dbe4a5d49baa4404a399860bd3a6182783ece (patch) | |
tree | 2eda1810d047df4dd02f1485ef295cebe04baeec /Source/cmSeparateArgumentsCommand.cxx | |
parent | 337be1507d0850c1d83de0f9ad87a780c9cb61af (diff) | |
parent | 6ab28b9413ade87cf9fbaad439f8cb4c27ecc97f (diff) | |
download | CMake-130dbe4a5d49baa4404a399860bd3a6182783ece.zip CMake-130dbe4a5d49baa4404a399860bd3a6182783ece.tar.gz CMake-130dbe4a5d49baa4404a399860bd3a6182783ece.tar.bz2 |
Merge topic 'cmCommand_refactor'
6ab28b9413 cmCommand refactor: cmStringCommand
36f32d3604 cmCommand refactor: cmSetPropertyCommand
7c83c19205 cmCommand refactor: cmSetDirectoryPropertiesCommand
9413952c42 cmCommand refactor: cmCMakePolicyCommand
07ea93de54 cmCommand refactor: cmWriteFileCommand
ca3b9186bb cmCommand refactor: cmVariableWatchCommand
b1acc711f4 cmCommand refactor: cmRemoveCommand
413a960391 cmCommand refactor: cmCMakeHostSystemInformationCommand
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3673
Diffstat (limited to 'Source/cmSeparateArgumentsCommand.cxx')
-rw-r--r-- | Source/cmSeparateArgumentsCommand.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx index ab4a0c7..27f45a8 100644 --- a/Source/cmSeparateArgumentsCommand.cxx +++ b/Source/cmSeparateArgumentsCommand.cxx @@ -5,17 +5,16 @@ #include <algorithm> #include <sstream> +#include "cmExecutionStatus.h" #include "cmMakefile.h" #include "cmSystemTools.h" -class cmExecutionStatus; - // cmSeparateArgumentsCommand -bool cmSeparateArgumentsCommand::InitialPass( - std::vector<std::string> const& args, cmExecutionStatus&) +bool cmSeparateArgumentsCommand(std::vector<std::string> const& args, + cmExecutionStatus& status) { if (args.empty()) { - this->SetError("must be given at least one argument."); + status.SetError("must be given at least one argument."); return false; } @@ -59,17 +58,17 @@ bool cmSeparateArgumentsCommand::InitialPass( } else { std::ostringstream e; e << "given unknown argument " << arg; - this->SetError(e.str()); + status.SetError(e.str()); return false; } } if (mode == ModeOld) { // Original space-replacement version of command. - if (const char* def = this->Makefile->GetDefinition(var)) { + if (const char* def = status.GetMakefile().GetDefinition(var)) { std::string value = def; std::replace(value.begin(), value.end(), ' ', ';'); - this->Makefile->AddDefinition(var, value); + status.GetMakefile().AddDefinition(var, value); } } else { // Parse the command line. @@ -97,7 +96,7 @@ bool cmSeparateArgumentsCommand::InitialPass( value += si; } } - this->Makefile->AddDefinition(var, value); + status.GetMakefile().AddDefinition(var, value); } return true; |