summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/list/SORT-NotList.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2018-10-11 21:23:12 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2018-10-16 18:31:39 (GMT)
commitacfe53c58817c662b935fbe0f0443de298371731 (patch)
tree7b2e3dcee64622cbc0f2d514cd0b2727c0ddbc0d /Tests/RunCMake/list/SORT-NotList.cmake
parentbf572ac952d7ddf2b7208efc56f104844aea72e2 (diff)
downloadCMake-acfe53c58817c662b935fbe0f0443de298371731.zip
CMake-acfe53c58817c662b935fbe0f0443de298371731.tar.gz
CMake-acfe53c58817c662b935fbe0f0443de298371731.tar.bz2
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)`
Diffstat (limited to 'Tests/RunCMake/list/SORT-NotList.cmake')
-rw-r--r--Tests/RunCMake/list/SORT-NotList.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/list/SORT-NotList.cmake b/Tests/RunCMake/list/SORT-NotList.cmake
index 8f48e10..6314f14 100644
--- a/Tests/RunCMake/list/SORT-NotList.cmake
+++ b/Tests/RunCMake/list/SORT-NotList.cmake
@@ -1,2 +1,6 @@
unset(nosuchlist)
list(SORT nosuchlist)
+if (DEFINED nosuchlist)
+ message(FATAL_ERROR
+ "list(SORT) created our list")
+endif ()