summaryrefslogtreecommitdiffstats
path: root/Source/cmRemoveCommand.cxx
diff options
context:
space:
mode:
authorGabor Bencze <b.gabor98@gmail.com>2019-08-09 09:51:17 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-20 18:42:20 (GMT)
commitb1acc711f4cdf62a850c09a85256482db2e2af2e (patch)
tree35a898effd42a0e38f2ad9ccdea1983d2fc59464 /Source/cmRemoveCommand.cxx
parent413a960391291678f216fe3d2bbfbd3fdca84168 (diff)
downloadCMake-b1acc711f4cdf62a850c09a85256482db2e2af2e.zip
CMake-b1acc711f4cdf62a850c09a85256482db2e2af2e.tar.gz
CMake-b1acc711f4cdf62a850c09a85256482db2e2af2e.tar.bz2
cmCommand refactor: cmRemoveCommand
Diffstat (limited to 'Source/cmRemoveCommand.cxx')
-rw-r--r--Source/cmRemoveCommand.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx
index 4ba21fa..457b708 100644
--- a/Source/cmRemoveCommand.cxx
+++ b/Source/cmRemoveCommand.cxx
@@ -2,14 +2,13 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmRemoveCommand.h"
+#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
-class cmExecutionStatus;
-
// cmRemoveCommand
-bool cmRemoveCommand::InitialPass(std::vector<std::string> const& args,
- cmExecutionStatus&)
+bool cmRemoveCommand(std::vector<std::string> const& args,
+ cmExecutionStatus& status)
{
if (args.empty()) {
return true;
@@ -17,7 +16,7 @@ bool cmRemoveCommand::InitialPass(std::vector<std::string> const& args,
std::string const& variable = args[0]; // VAR is always first
// get the old value
- const char* cacheValue = this->Makefile->GetDefinition(variable);
+ const char* cacheValue = status.GetMakefile().GetDefinition(variable);
// if there is no old value then return
if (!cacheValue) {
@@ -51,7 +50,7 @@ bool cmRemoveCommand::InitialPass(std::vector<std::string> const& args,
}
// add the definition
- this->Makefile->AddDefinition(variable, value);
+ status.GetMakefile().AddDefinition(variable, value);
return true;
}