summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/list/REMOVE_AT-NotList.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2018-10-11 17:26:44 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2018-10-16 14:31:39 -0400
commit121a036f73665a18ccadeaf50b00cc623d8ed9df (patch)
treef361e2403c53546425781713b7bdeb57e5ba9389 /Tests/RunCMake/list/REMOVE_AT-NotList.cmake
parentacfe53c58817c662b935fbe0f0443de298371731 (diff)
downloadcmake-121a036f73665a18ccadeaf50b00cc623d8ed9df.tar.gz
cmListCommand: handle empty lists for list(REMOVE_AT)
Treat an empty list as a list with no valid bounds and return an error message indicating that any given indices are out-of-bounds.
Diffstat (limited to 'Tests/RunCMake/list/REMOVE_AT-NotList.cmake')
-rw-r--r--Tests/RunCMake/list/REMOVE_AT-NotList.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList.cmake b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake
index 5266c7fe99..090df49337 100644
--- a/Tests/RunCMake/list/REMOVE_AT-NotList.cmake
+++ b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake
@@ -1,2 +1,6 @@
unset(nosuchlist)
list(REMOVE_AT nosuchlist 0)
+if (DEFINED nosuchlist)
+ message(FATAL_ERROR
+ "list(REMOVE_AT) created our list")
+endif ()