Commit ccdf7e04 authored by Brad King's avatar Brad King 💬
Browse files

macro: Do not substitute for placeholders in bracket arguments

Fix the macro command implementation to avoid substituting macro
placeholders in bracket arguments recorded inside the macro block.
parent 999abb99
...@@ -140,6 +140,12 @@ bool cmMacroHelperCommand::InvokeInitialPass ...@@ -140,6 +140,12 @@ bool cmMacroHelperCommand::InvokeInitialPass
// Set the FilePath on the arguments to match the function since it is // Set the FilePath on the arguments to match the function since it is
// not stored and the original values may be freed // not stored and the original values may be freed
k->FilePath = this->FilePath.c_str(); k->FilePath = this->FilePath.c_str();
if(k->Delim == cmListFileArgument::Bracket)
{
arg.Value = k->Value;
}
else
{
tmps = k->Value; tmps = k->Value;
// replace formal arguments // replace formal arguments
for (unsigned int j = 1; j < this->Args.size(); ++j) for (unsigned int j = 1; j < this->Args.size(); ++j)
...@@ -209,6 +215,7 @@ bool cmMacroHelperCommand::InvokeInitialPass ...@@ -209,6 +215,7 @@ bool cmMacroHelperCommand::InvokeInitialPass
} }
arg.Value = tmps; arg.Value = tmps;
}
arg.Delim = k->Delim; arg.Delim = k->Delim;
arg.FilePath = k->FilePath; arg.FilePath = k->FilePath;
arg.Line = k->Line; arg.Line = k->Line;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment