summaryrefslogtreecommitdiff
path: root/Source/cmListCommand.h
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-15 10:26:50 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-08-15 10:26:50 -0400
commit2f23ecdb8aa5bc1a86158df551f5649c439c7c52 (patch)
treede39decb56efe7120c4e65d4012d829e95de3f66 /Source/cmListCommand.h
parent58b0e317847994fdce6371605161ddac70a02eb3 (diff)
downloadcmake-2f23ecdb8aa5bc1a86158df551f5649c439c7c52.tar.gz
ENH: change LIST(CONTAINS ...) TO LIST(FIND ...), which returns the index
and which is more useful, because then you can also access the item behind the one you were looking, useful for writing macros with optional keywords with parameters Alex
Diffstat (limited to 'Source/cmListCommand.h')
-rw-r--r--Source/cmListCommand.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h
index d8a4688c7d..a99604b801 100644
--- a/Source/cmListCommand.h
+++ b/Source/cmListCommand.h
@@ -68,7 +68,7 @@ public:
" LIST(GET <list> <element index> [<element index> ...] "
"<output variable>)\n"
" LIST(APPEND <list> <element> [<element> ...])\n"
- " LIST(CONTAINS <list> <value> <output variable>)\n"
+ " LIST(FIND <list> <value> <output variable>)\n"
" LIST(INSERT <list> <element_index> <element> [<element> ...])\n"
" LIST(REMOVE_ITEM <list> <value> [<value> ...])\n"
" LIST(REMOVE_AT <list> <index> [<index> ...])\n"
@@ -77,7 +77,8 @@ public:
"LENGTH will return a given list's length.\n"
"GET will return list of elements specified by indices from the list.\n"
"APPEND will append elements to the list.\n"
- "CONTAINS will return TRUE if the element specified is in the list.\n"
+ "FIND will return the index of the element specified in the list or -1 "
+ "if it wasn't found.\n"
"INSERT will insert elements to the list to the specified location.\n"
"When specifying an index, negative value corresponds to index from the"
" end of the list.\n"
@@ -94,7 +95,7 @@ protected:
bool HandleLengthCommand(std::vector<std::string> const& args);
bool HandleGetCommand(std::vector<std::string> const& args);
bool HandleAppendCommand(std::vector<std::string> const& args);
- bool HandleContainsCommand(std::vector<std::string> const& args);
+ bool HandleFindCommand(std::vector<std::string> const& args);
bool HandleInsertCommand(std::vector<std::string> const& args);
bool HandleRemoveAtCommand(std::vector<std::string> const& args);
bool HandleRemoveItemCommand(std::vector<std::string> const& args);