diff options
author | Gabor Bencze <b.gabor98@gmail.com> | 2019-08-04 16:31:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-20 18:42:19 (GMT) |
commit | 2b58ae75773ff826bb1c3e6c5a3bad31c5292f00 (patch) | |
tree | 15794e281f1a755a511568f2621f880cb97bc2f5 /Source/cmMarkAsAdvancedCommand.cxx | |
parent | 5b40a872dd2d50e2c72c76df79ce087403daa37d (diff) | |
download | CMake-2b58ae75773ff826bb1c3e6c5a3bad31c5292f00.zip CMake-2b58ae75773ff826bb1c3e6c5a3bad31c5292f00.tar.gz CMake-2b58ae75773ff826bb1c3e6c5a3bad31c5292f00.tar.bz2 |
cmCommand refactor: cmMarkAsAdvancedCommand
Diffstat (limited to 'Source/cmMarkAsAdvancedCommand.cxx')
-rw-r--r-- | Source/cmMarkAsAdvancedCommand.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx index 45c59b9..ca46e14 100644 --- a/Source/cmMarkAsAdvancedCommand.cxx +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -2,20 +2,19 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMarkAsAdvancedCommand.h" +#include "cmExecutionStatus.h" #include "cmMakefile.h" #include "cmState.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmake.h" -class cmExecutionStatus; - // cmMarkAsAdvancedCommand -bool cmMarkAsAdvancedCommand::InitialPass(std::vector<std::string> const& args, - cmExecutionStatus&) +bool cmMarkAsAdvancedCommand(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; } @@ -31,9 +30,9 @@ bool cmMarkAsAdvancedCommand::InitialPass(std::vector<std::string> const& args, } for (; i < args.size(); ++i) { std::string const& variable = args[i]; - cmState* state = this->Makefile->GetState(); + cmState* state = status.GetMakefile().GetState(); if (!state->GetCacheEntryValue(variable)) { - this->Makefile->GetCMakeInstance()->AddCacheEntry( + status.GetMakefile().GetCMakeInstance()->AddCacheEntry( variable, nullptr, nullptr, cmStateEnums::UNINITIALIZED); overwrite = true; } |