cmMacroCommand: Execute loop only if it has an effect.
This commit is contained in:
parent
f95543f8a6
commit
11ecc31d0a
@ -164,20 +164,23 @@ bool cmMacroHelperCommand::InvokeInitialPass
|
|||||||
{
|
{
|
||||||
if (!argnDefInitialized)
|
if (!argnDefInitialized)
|
||||||
{
|
{
|
||||||
std::vector<std::string>::const_iterator eit
|
if (expandedArgs.size() > this->Args.size() - 1)
|
||||||
= expandedArgs.begin();
|
|
||||||
std::vector<std::string>::size_type cnt = 0;
|
|
||||||
for( ; eit != expandedArgs.end(); ++eit)
|
|
||||||
{
|
{
|
||||||
if ( cnt >= this->Args.size()-1 )
|
std::vector<std::string>::const_iterator eit
|
||||||
|
= expandedArgs.begin();
|
||||||
|
std::vector<std::string>::size_type cnt = 0;
|
||||||
|
for( ; eit != expandedArgs.end(); ++eit)
|
||||||
{
|
{
|
||||||
if (!argnDef.empty())
|
if ( cnt >= this->Args.size()-1 )
|
||||||
{
|
{
|
||||||
argnDef += ";";
|
if (!argnDef.empty())
|
||||||
|
{
|
||||||
|
argnDef += ";";
|
||||||
|
}
|
||||||
|
argnDef += *eit;
|
||||||
}
|
}
|
||||||
argnDef += *eit;
|
cnt ++;
|
||||||
}
|
}
|
||||||
cnt ++;
|
|
||||||
}
|
}
|
||||||
argnDefInitialized = true;
|
argnDefInitialized = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user