summaryrefslogtreecommitdiffstats
path: root/Source/cmRemoveCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-22 14:23:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-22 14:25:09 (GMT)
commit130dbe4a5d49baa4404a399860bd3a6182783ece (patch)
tree2eda1810d047df4dd02f1485ef295cebe04baeec /Source/cmRemoveCommand.cxx
parent337be1507d0850c1d83de0f9ad87a780c9cb61af (diff)
parent6ab28b9413ade87cf9fbaad439f8cb4c27ecc97f (diff)
downloadCMake-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/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;
}