Files
CMake/Tests/RunCMake/list/REMOVE_AT-NotList.cmake
Ben Boeckel 121a036f73 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.
2018-10-16 14:31:39 -04:00

7 lines
144 B
CMake

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