diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-23 19:28:30 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-06-21 18:31:27 (GMT) |
commit | f971ab04cfdcb73e1ac2b182caf302172aebe6a8 (patch) | |
tree | b4058218c73836569268f0b68a80a5f45fe5e737 /Source/cmMacroCommand.cxx | |
parent | 155ef535974ab9e78e98da00b63f31bd5c848bd0 (diff) | |
download | CMake-f971ab04cfdcb73e1ac2b182caf302172aebe6a8.zip CMake-f971ab04cfdcb73e1ac2b182caf302172aebe6a8.tar.gz CMake-f971ab04cfdcb73e1ac2b182caf302172aebe6a8.tar.bz2 |
cmMacroCommand: Store the FilePath when creating the prototype.
Instead of setting it each time the macro is invoked.
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r-- | Source/cmMacroCommand.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 028ab62..7793dc4 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -122,10 +122,6 @@ bool cmMacroHelperCommand::InvokeInitialPass sprintf(argvName,"${ARGV%i}",j); argVs.push_back(argvName); } - if(!this->Functions.empty()) - { - this->FilePath = this->Functions[0].FilePath; - } // Invoke all the functions that were collected in the block. cmListFileFunction newLFF; // for each function @@ -225,6 +221,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, cmMacroHelperCommand *f = new cmMacroHelperCommand(); f->Args = this->Args; 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); |