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.
33 lines
843 B
33 lines
843 B
2 years ago
|
|
||
|
include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
|
||
|
unset (errors)
|
||
|
|
||
|
set(listvar a b c d)
|
||
|
list(REMOVE_ITEM listvar b d)
|
||
|
set (output "$<LIST:REMOVE_ITEM,a;b;c;d,b,d>")
|
||
|
if (NOT output STREQUAL listvar)
|
||
|
list (APPEND errors "returns bad value: ${output}")
|
||
|
endif()
|
||
|
|
||
|
set(listvar a b c d)
|
||
|
list(REMOVE_ITEM listvar b e)
|
||
|
set (output "$<LIST:REMOVE_ITEM,a;b;c;d,b,e>")
|
||
|
if (NOT output STREQUAL listvar)
|
||
|
list (APPEND errors "returns bad value: ${output}")
|
||
|
endif()
|
||
|
|
||
|
set(listvar a b c d)
|
||
|
list(REMOVE_ITEM listvar b a d c)
|
||
|
set (output "$<LIST:REMOVE_ITEM,a;b;c;d,b;a;d;c>")
|
||
|
if (NOT output STREQUAL listvar)
|
||
|
list (APPEND errors "returns bad value: ${output}")
|
||
|
endif()
|
||
|
|
||
|
set (output "$<LIST:REMOVE_ITEM,,b;a;d;c>")
|
||
|
if (NOT output STREQUAL "")
|
||
|
list (APPEND errors "returns bad value: ${output}")
|
||
|
endif()
|
||
|
|
||
|
|
||
|
check_errors("LIST:REMOVE_ITEM..." ${errors})
|