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

7 lines
172 B
CMake
Raw Normal View History

2012-09-30 12:44:18 +04:00
set(thelist "" NEW OLD)
list(GET thelist 1 thevalue)
if (NOT thevalue STREQUAL "OLD")
message(SEND_ERROR "returned element '${thevalue}', but expected 'OLD'")
endif()