cmMacroCommand: Store the FilePath when creating the prototype.
Instead of setting it each time the macro is invoked.
This commit is contained in:
parent
155ef53597
commit
f971ab04cf
|
@ -122,10 +122,6 @@ bool cmMacroHelperCommand::InvokeInitialPass
|
||||||
sprintf(argvName,"${ARGV%i}",j);
|
sprintf(argvName,"${ARGV%i}",j);
|
||||||
argVs.push_back(argvName);
|
argVs.push_back(argvName);
|
||||||
}
|
}
|
||||||
if(!this->Functions.empty())
|
|
||||||
{
|
|
||||||
this->FilePath = this->Functions[0].FilePath;
|
|
||||||
}
|
|
||||||
// Invoke all the functions that were collected in the block.
|
// Invoke all the functions that were collected in the block.
|
||||||
cmListFileFunction newLFF;
|
cmListFileFunction newLFF;
|
||||||
// for each function
|
// for each function
|
||||||
|
@ -225,6 +221,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||||
cmMacroHelperCommand *f = new cmMacroHelperCommand();
|
cmMacroHelperCommand *f = new cmMacroHelperCommand();
|
||||||
f->Args = this->Args;
|
f->Args = this->Args;
|
||||||
f->Functions = this->Functions;
|
f->Functions = this->Functions;
|
||||||
|
f->FilePath = this->GetStartingContext().FilePath;
|
||||||
mf.RecordPolicies(f->Policies);
|
mf.RecordPolicies(f->Policies);
|
||||||
std::string newName = "_" + this->Args[0];
|
std::string newName = "_" + this->Args[0];
|
||||||
mf.GetState()->RenameCommand(this->Args[0], newName);
|
mf.GetState()->RenameCommand(this->Args[0], newName);
|
||||||
|
|
Loading…
Reference in New Issue