mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 14:19:59 -05:00
ENH: add REMOVE_DUPLICATES subcommand to LIST command (and test). Remove duplicates from a list (keep the ordering)
This commit is contained in:
@@ -73,6 +73,7 @@ public:
|
||||
" list(INSERT <list> <element_index> <element> [<element> ...])\n"
|
||||
" list(REMOVE_ITEM <list> <value> [<value> ...])\n"
|
||||
" list(REMOVE_AT <list> <index> [<index> ...])\n"
|
||||
" list(REMOVE_DUPLICATES <list>)\n"
|
||||
" list(REVERSE <list>)\n"
|
||||
" list(SORT <list>)\n"
|
||||
"LENGTH will return a given list's length.\n"
|
||||
@@ -84,6 +85,7 @@ public:
|
||||
"REMOVE_AT and REMOVE_ITEM will remove items from the list. The "
|
||||
"difference is that REMOVE_ITEM will remove the given items, while "
|
||||
"REMOVE_AT will remove the items at the given indices.\n"
|
||||
"REMOVE_DUPLICATES will remove duplicated items in the list.\n"
|
||||
"REVERSE reverses the contents of the list in-place.\n"
|
||||
"SORT sorts the list in-place alphabetically.\n"
|
||||
"NOTES: A list in cmake is a ; separated group of strings. "
|
||||
@@ -110,6 +112,7 @@ protected:
|
||||
bool HandleInsertCommand(std::vector<std::string> const& args);
|
||||
bool HandleRemoveAtCommand(std::vector<std::string> const& args);
|
||||
bool HandleRemoveItemCommand(std::vector<std::string> const& args);
|
||||
bool HandleRemoveDuplicatesCommand(std::vector<std::string> const& args);
|
||||
bool HandleSortCommand(std::vector<std::string> const& args);
|
||||
bool HandleReverseCommand(std::vector<std::string> const& args);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user