|
|
@@ -1,6 +1,6 @@
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
|
-#include "cmCMakeCommand.h"
|
|
|
+#include "cmCMakeLanguageCommand.h"
|
|
|
|
|
|
#include <algorithm>
|
|
|
#include <cstddef>
|
|
|
@@ -13,8 +13,8 @@
|
|
|
#include "cmRange.h"
|
|
|
#include "cmStringAlgorithms.h"
|
|
|
|
|
|
-bool cmCMakeCommand(std::vector<cmListFileArgument> const& args,
|
|
|
- cmExecutionStatus& status)
|
|
|
+bool cmCMakeLanguageCommand(std::vector<cmListFileArgument> const& args,
|
|
|
+ cmExecutionStatus& status)
|
|
|
{
|
|
|
if (args.empty()) {
|
|
|
status.SetError("called with incorrect number of arguments");
|
|
|
@@ -36,7 +36,7 @@ bool cmCMakeCommand(std::vector<cmListFileArgument> const& args,
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- if (dispatchExpandedArgs[0] == "INVOKE") {
|
|
|
+ if (dispatchExpandedArgs[0] == "CALL") {
|
|
|
if ((args.size() == 1 && dispatchExpandedArgs.size() != 2) ||
|
|
|
dispatchExpandedArgs.size() > 2) {
|
|
|
status.SetError("called with incorrect number of arguments");
|
|
|
@@ -44,7 +44,7 @@ bool cmCMakeCommand(std::vector<cmListFileArgument> const& args,
|
|
|
}
|
|
|
|
|
|
// First argument is the name of the function to call
|
|
|
- std::string invokeCommand;
|
|
|
+ std::string callCommand;
|
|
|
size_t startArg;
|
|
|
if (dispatchExpandedArgs.size() == 1) {
|
|
|
std::vector<std::string> functionExpandedArg;
|
|
|
@@ -57,15 +57,15 @@ bool cmCMakeCommand(std::vector<cmListFileArgument> const& args,
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- invokeCommand = functionExpandedArg[0];
|
|
|
+ callCommand = functionExpandedArg[0];
|
|
|
startArg = 2;
|
|
|
} else {
|
|
|
- invokeCommand = dispatchExpandedArgs[1];
|
|
|
+ callCommand = dispatchExpandedArgs[1];
|
|
|
startArg = 1;
|
|
|
}
|
|
|
|
|
|
cmListFileFunction func;
|
|
|
- func.Name = invokeCommand;
|
|
|
+ func.Name = callCommand;
|
|
|
func.Line = context.Line;
|
|
|
|
|
|
// The rest of the arguments are passed to the function call above
|