Files
CMake/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake
Ben Boeckel acfe53c588 cmListCommand: make list(ACTION not_a_list) succeed when idempotent
The operations changed here all are no-ops on empty lists anyways, so
just have them succeed when given non-extant lists.

  - `list(REMOVE_ITEM)`
  - `list(REMOVE_DUPLICATES)`
  - `list(SORT)`
  - `list(FILTER)`
  - `list(REVERSE)`
2018-10-16 14:31:39 -04:00

7 lines
156 B
CMake

unset(nosuchlist)
list(REMOVE_DUPLICATES nosuchlist)
if (DEFINED nosuchlist)
message(FATAL_ERROR
"list(REMOVE_DUPLICATES) created our list")
endif ()