summaryrefslogtreecommitdiffstats
path: root/Source/cmListCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r--Source/cmListCommand.cxx21
1 files changed, 3 insertions, 18 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 50adce6..e2ebe0a 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -418,24 +418,9 @@ bool cmListCommand
return false;
}
- std::string value;
-
-
- std::set<std::string> unique;
- std::vector<std::string>::iterator it;
- const char* sep = "";
- for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it )
- {
- if (unique.find(*it) != unique.end())
- {
- continue;
- }
- unique.insert(*it);
- value += sep;
- value += it->c_str();
- sep = ";";
- }
-
+ varArgsExpanded.erase(cmRemoveDuplicates(varArgsExpanded),
+ varArgsExpanded.end());
+ std::string value = cmJoin(varArgsExpanded, ";");
this->Makefile->AddDefinition(listName, value.c_str());
return true;