cmMacroCommand: Execute loop only if it has an effect.

This commit is contained in:
Stephen Kelly 2015-01-25 15:44:49 +01:00
parent f95543f8a6
commit 11ecc31d0a
1 changed files with 12 additions and 9 deletions

View File

@ -163,6 +163,8 @@ bool cmMacroHelperCommand::InvokeInitialPass
if (tmps.find("${ARGN}") != std::string::npos)
{
if (!argnDefInitialized)
{
if (expandedArgs.size() > this->Args.size() - 1)
{
std::vector<std::string>::const_iterator eit
= expandedArgs.begin();
@ -179,6 +181,7 @@ bool cmMacroHelperCommand::InvokeInitialPass
}
cnt ++;
}
}
argnDefInitialized = true;
}
cmSystemTools::ReplaceString(tmps, "${ARGN}", argnDef.c_str());