cmListCommand: Implement REMOVE_ITEM in terms of cmRemoveMatching.
This commit is contained in:
parent
050958a328
commit
3cfe7a4ca8
|
@ -355,23 +355,13 @@ bool cmListCommand
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t cc;
|
std::vector<std::string> remove(args.begin() + 2, args.end());
|
||||||
for ( cc = 2; cc < args.size(); ++ cc )
|
std::sort(remove.begin(), remove.end());
|
||||||
{
|
remove.erase(std::unique(remove.begin(), remove.end()), remove.end());
|
||||||
size_t kk = 0;
|
|
||||||
while ( kk < varArgsExpanded.size() )
|
|
||||||
{
|
|
||||||
if ( varArgsExpanded[kk] == args[cc] )
|
|
||||||
{
|
|
||||||
varArgsExpanded.erase(varArgsExpanded.begin()+kk);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
kk ++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
varArgsExpanded.erase(
|
||||||
|
cmRemoveMatching(varArgsExpanded, remove),
|
||||||
|
varArgsExpanded.end());
|
||||||
|
|
||||||
std::string value = cmJoin(varArgsExpanded, ";");
|
std::string value = cmJoin(varArgsExpanded, ";");
|
||||||
this->Makefile->AddDefinition(listName, value.c_str());
|
this->Makefile->AddDefinition(listName, value.c_str());
|
||||||
|
|
Loading…
Reference in New Issue