summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeGuardCommand.cxx
diff options
context:
space:
mode:
authorGabor Bencze <b.gabor98@gmail.com>2019-08-02 16:35:08 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-20 18:42:19 (GMT)
commitceab7bda44b06fc6fdb842b7a51ccc662c907fb9 (patch)
tree10a24015fe8128ea7631cc1208bfef442ab5c145 /Source/cmIncludeGuardCommand.cxx
parentf42dad7a5e8656b8eee9b9b928ab3ce9ba90fbf8 (diff)
downloadCMake-ceab7bda44b06fc6fdb842b7a51ccc662c907fb9.zip
CMake-ceab7bda44b06fc6fdb842b7a51ccc662c907fb9.tar.gz
CMake-ceab7bda44b06fc6fdb842b7a51ccc662c907fb9.tar.bz2
cmCommand refactor: cmIncludeGuardCommand
Diffstat (limited to 'Source/cmIncludeGuardCommand.cxx')
-rw-r--r--Source/cmIncludeGuardCommand.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmIncludeGuardCommand.cxx b/Source/cmIncludeGuardCommand.cxx
index e560910..ccb4496 100644
--- a/Source/cmIncludeGuardCommand.cxx
+++ b/Source/cmIncludeGuardCommand.cxx
@@ -50,11 +50,11 @@ bool CheckIncludeGuardIsSet(cmMakefile* mf, std::string const& includeGuardVar)
} // anonymous namespace
// cmIncludeGuardCommand
-bool cmIncludeGuardCommand::InitialPass(std::vector<std::string> const& args,
- cmExecutionStatus& status)
+bool cmIncludeGuardCommand(std::vector<std::string> const& args,
+ cmExecutionStatus& status)
{
if (args.size() > 1) {
- this->SetError(
+ status.SetError(
"given an invalid number of arguments. The command takes at "
"most 1 argument.");
return false;
@@ -69,15 +69,15 @@ bool cmIncludeGuardCommand::InitialPass(std::vector<std::string> const& args,
} else if (arg == "GLOBAL") {
scope = GLOBAL;
} else {
- this->SetError("given an invalid scope: " + arg);
+ status.SetError("given an invalid scope: " + arg);
return false;
}
}
std::string includeGuardVar = GetIncludeGuardVariableName(
- this->Makefile->GetDefinition("CMAKE_CURRENT_LIST_FILE"));
+ status.GetMakefile().GetDefinition("CMAKE_CURRENT_LIST_FILE"));
- cmMakefile* const mf = this->Makefile;
+ cmMakefile* const mf = &status.GetMakefile();
switch (scope) {
case VARIABLE: