summaryrefslogtreecommitdiffstats
path: root/Source/cmMacroCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r--Source/cmMacroCommand.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index b7cbae6..7ac4432 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -232,9 +232,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
f->Functions = this->Functions;
mf.RecordPolicies(f->Policies);
std::string newName = "_" + this->Args[0];
- mf.GetCMakeInstance()->RenameCommand(this->Args[0],
- newName);
- mf.AddCommand(f);
+ mf.GetState()->RenameCommand(this->Args[0], newName);
+ mf.GetState()->AddCommand(f);
// remove the function blocker now that the macro is defined
mf.RemoveFunctionBlocker(this, lff);