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/cmMacroCommand.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/cmMacroCommand.cxx')
-rw-r--r-- | Source/cmMacroCommand.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 7793dc4..c3e67d7 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -251,7 +251,8 @@ ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf) if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endmacro")) { std::vector<std::string> expandedArguments; - mf.ExpandArguments(lff.Arguments, expandedArguments); + mf.ExpandArguments(lff.Arguments, expandedArguments, + this->GetStartingContext().FilePath.c_str()); // if the endmacro has arguments make sure they // match the arguments of the macro if ((expandedArguments.empty() || |