cmMacroCommand: Execute loop only if it has an effect.
This commit is contained in:
parent
f95543f8a6
commit
11ecc31d0a
@ -163,6 +163,8 @@ bool cmMacroHelperCommand::InvokeInitialPass
|
|||||||
if (tmps.find("${ARGN}") != std::string::npos)
|
if (tmps.find("${ARGN}") != std::string::npos)
|
||||||
{
|
{
|
||||||
if (!argnDefInitialized)
|
if (!argnDefInitialized)
|
||||||
|
{
|
||||||
|
if (expandedArgs.size() > this->Args.size() - 1)
|
||||||
{
|
{
|
||||||
std::vector<std::string>::const_iterator eit
|
std::vector<std::string>::const_iterator eit
|
||||||
= expandedArgs.begin();
|
= expandedArgs.begin();
|
||||||
@ -179,6 +181,7 @@ bool cmMacroHelperCommand::InvokeInitialPass
|
|||||||
}
|
}
|
||||||
cnt ++;
|
cnt ++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
argnDefInitialized = true;
|
argnDefInitialized = true;
|
||||||
}
|
}
|
||||||
cmSystemTools::ReplaceString(tmps, "${ARGN}", argnDef.c_str());
|
cmSystemTools::ReplaceString(tmps, "${ARGN}", argnDef.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user