cmListCommand: Implement REVERSE subcommand with std::reverse.
This commit is contained in:
parent
1cecd3a531
commit
67a26764b5
|
@ -410,15 +410,8 @@ bool cmListCommand
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string value;
|
std::reverse(varArgsExpanded.begin(), varArgsExpanded.end());
|
||||||
std::vector<std::string>::reverse_iterator it;
|
std::string value = cmJoin(varArgsExpanded, ";");
|
||||||
const char* sep = "";
|
|
||||||
for ( it = varArgsExpanded.rbegin(); it != varArgsExpanded.rend(); ++ it )
|
|
||||||
{
|
|
||||||
value += sep;
|
|
||||||
value += it->c_str();
|
|
||||||
sep = ";";
|
|
||||||
}
|
|
||||||
|
|
||||||
this->Makefile->AddDefinition(listName, value.c_str());
|
this->Makefile->AddDefinition(listName, value.c_str());
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue