CMake/Tests/CMakeTests/List-Get-CMP0007-Warn.cmake

7 lines
172 B
CMake

set(thelist "" NEW OLD)
list(GET thelist 1 thevalue)
if (NOT thevalue STREQUAL "OLD")
message(SEND_ERROR "returned element '${thevalue}', but expected 'OLD'")
endif()