mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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.
7 lines
144 B
CMake
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 ()
|