You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
476 B
21 lines
476 B
2 years ago
|
|
||
|
include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
|
||
|
unset (errors)
|
||
|
|
||
|
set(listvar a b c d)
|
||
|
|
||
|
list(GET listvar 0 2 reference)
|
||
|
set (output "$<LIST:GET,a;b;c;d,0,2>")
|
||
|
if (NOT output STREQUAL reference)
|
||
|
list (APPEND errors "returns bad value: ${output}")
|
||
|
endif()
|
||
|
|
||
|
list(GET listvar 0 -3 2 reference)
|
||
|
set (output "$<LIST:GET,a;b;c;d,0,-3,2>")
|
||
|
if (NOT output STREQUAL reference)
|
||
|
list (APPEND errors "returns bad value: ${output}")
|
||
|
endif()
|
||
|
|
||
|
|
||
|
check_errors("LIST:GET..." ${errors})
|