diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-23 18:32:05 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-06-21 18:57:25 (GMT) |
commit | 076760a63c665dd2269c74d415e323f55969f544 (patch) | |
tree | 52b0bcdda884a0e9509473c60409c378a60c29d2 /Source/cmFunctionCommand.cxx | |
parent | 569f4785371399628dd401e2522dccc54c73e34e (diff) | |
download | CMake-076760a63c665dd2269c74d415e323f55969f544.zip CMake-076760a63c665dd2269c74d415e323f55969f544.tar.gz CMake-076760a63c665dd2269c74d415e323f55969f544.tar.bz2 |
cmMakefile: Add filename context to ExpandArguments.
The cmListFileArgument currently stores a FilePath for use in this
method. The filename is the same as the CMAKE_CURRENT_LIST_FILE,
except if executing a macro or function defined in another file.
Set the context filename when expanding the arguments of macros and
functions using the filename recorded when defining the prototype.
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r-- | Source/cmFunctionCommand.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 848cfd1..662f77d 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -215,7 +215,8 @@ ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf) if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endfunction")) { std::vector<std::string> expandedArguments; - mf.ExpandArguments(lff.Arguments, expandedArguments); + mf.ExpandArguments(lff.Arguments, expandedArguments, + this->GetStartingContext().FilePath.c_str()); // if the endfunction has arguments then make sure // they match the ones in the opening function command if ((expandedArguments.empty() || |