Merge topic 'clean-up-cmFunctionCommand'
78757e7f
cmFunctionCommand: Replace loops with cmJoin.fc1cf265
cmFunctionCommand: Remove counting variable.e5ebeae7
cmFunctionCommand: Split loop in two.
This commit is contained in:
commit
d6616181c8
|
@ -126,27 +126,10 @@ bool cmFunctionHelperCommand::InvokeInitialPass
|
||||||
}
|
}
|
||||||
|
|
||||||
// define ARGV and ARGN
|
// define ARGV and ARGN
|
||||||
std::vector<std::string>::const_iterator eit;
|
std::string argvDef = cmJoin(expandedArgs, ";");
|
||||||
std::string argvDef;
|
std::vector<std::string>::const_iterator eit
|
||||||
std::string argnDef;
|
= expandedArgs.begin() + (this->Args.size()-1);
|
||||||
unsigned int cnt = 0;
|
std::string argnDef = cmJoin(cmRange(eit, expandedArgs.end()), ";");
|
||||||
for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit )
|
|
||||||
{
|
|
||||||
if (!argvDef.empty())
|
|
||||||
{
|
|
||||||
argvDef += ";";
|
|
||||||
}
|
|
||||||
argvDef += *eit;
|
|
||||||
if ( cnt >= this->Args.size()-1 )
|
|
||||||
{
|
|
||||||
if (!argnDef.empty())
|
|
||||||
{
|
|
||||||
argnDef += ";";
|
|
||||||
}
|
|
||||||
argnDef += *eit;
|
|
||||||
}
|
|
||||||
cnt ++;
|
|
||||||
}
|
|
||||||
this->Makefile->AddDefinition("ARGV", argvDef.c_str());
|
this->Makefile->AddDefinition("ARGV", argvDef.c_str());
|
||||||
this->Makefile->MarkVariableAsUsed("ARGV");
|
this->Makefile->MarkVariableAsUsed("ARGV");
|
||||||
this->Makefile->AddDefinition("ARGN", argnDef.c_str());
|
this->Makefile->AddDefinition("ARGN", argnDef.c_str());
|
||||||
|
|
Loading…
Reference in New Issue