summaryrefslogtreecommitdiffstats
path: root/Source/cmFunctionCommand.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-05-10 19:33:06 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-05-11 17:49:06 (GMT)
commita44dab461ffe269618f008f16e249d9101c5bd88 (patch)
tree404a5531a43d1636402586275cccff23fea76def /Source/cmFunctionCommand.cxx
parentc734c8501b5e8865b8a2e92a8834644becb181e4 (diff)
downloadCMake-a44dab461ffe269618f008f16e249d9101c5bd88.zip
CMake-a44dab461ffe269618f008f16e249d9101c5bd88.tar.gz
CMake-a44dab461ffe269618f008f16e249d9101c5bd88.tar.bz2
cmState: introduce method for adding scripted commands
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r--Source/cmFunctionCommand.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index dccc29f..642b029 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -149,11 +149,7 @@ bool cmFunctionFunctionBlocker::IsFunctionBlocked(
f->Functions = this->Functions;
f->FilePath = this->GetStartingContext().FilePath;
mf.RecordPolicies(f->Policies);
-
- std::string newName = "_" + this->Args[0];
- mf.GetState()->RenameCommand(this->Args[0], newName);
- mf.GetState()->AddCommand(f);
-
+ mf.GetState()->AddScriptedCommand(this->Args[0], f);
// remove the function blocker now that the function is defined
mf.RemoveFunctionBlocker(this, lff);
return true;