summaryrefslogtreecommitdiffstats
path: root/Source/cmMacroCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-23 18:32:05 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-21 18:57:25 (GMT)
commit076760a63c665dd2269c74d415e323f55969f544 (patch)
tree52b0bcdda884a0e9509473c60409c378a60c29d2 /Source/cmMacroCommand.cxx
parent569f4785371399628dd401e2522dccc54c73e34e (diff)
downloadCMake-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.cxx3
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() ||