Remove ambiguity in list(REMOVE_ITEM...) documentation
If I apply cmake -P to the following CMake logic
set(list a b c a b c)
message(STATUS "list = ${list}")
list(REMOVE_ITEM list b a)
message(STATUS "list = ${list}")
the result is
-- list = a;b;c;a;b;c
-- list = c;c
That is, all instances of "b" and "a" are removed.
The reason I had to do the above test is the current documentation of list(REMOVE_ITEM...) is ambiguous about whether all instances or the first instances of the specified items are removed. So I suggest the following documentation change to remove that ambiguity:
- Removes the given items from the list.
+ Removes all instances of the given items from the list.
Being clear about this difference is important given that the name of REMOVE_ITEM gives the impression that single instances are removed.