summaryrefslogtreecommitdiffstats
path: root/Source/cmFunctionCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r--Source/cmFunctionCommand.cxx16
1 files changed, 1 insertions, 15 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index dccc29f..ee52bde 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -21,11 +21,6 @@ public:
~cmFunctionHelperCommand() CM_OVERRIDE {}
/**
- * This determines if the command is defined in a cmake script.
- */
- bool IsUserDefined() const CM_OVERRIDE { return true; }
-
- /**
* This is a virtual constructor for the command.
*/
cmCommand* Clone() CM_OVERRIDE
@@ -52,11 +47,6 @@ public:
return false;
}
- /**
- * The name of the command as specified in CMakeList.txt.
- */
- std::string GetName() const CM_OVERRIDE { return this->Args[0]; }
-
std::vector<std::string> Args;
std::vector<cmListFileFunction> Functions;
cmPolicies::PolicyMap Policies;
@@ -149,11 +139,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;