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.

35 lines
832 B

include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
unset (errors)
set(listvar a b c d)
list(APPEND listvar e)
set (output "$<LIST:APPEND,a;b;c;d,e>")
if (NOT output STREQUAL listvar)
list (APPEND errors "returns bad value: ${output}")
endif()
set(listvar a b c d)
list(APPEND listvar e f)
set (output "$<LIST:APPEND,a;b;c;d,e,f>")
if (NOT output STREQUAL listvar)
list (APPEND errors "returns bad value: ${output}")
endif()
set(listvar a b c d)
list(APPEND listvar e f)
set (output "$<LIST:APPEND,a;b;c;d,e;f>")
if (NOT output STREQUAL listvar)
list (APPEND errors "returns bad value: ${output}")
endif()
unset(listvar)
list(APPEND listvar e f)
set (output "$<LIST:APPEND,,e,f>")
if (NOT output STREQUAL listvar)
list (APPEND errors "returns bad value: ${output}")
endif()
check_errors("LIST:APPEND..." ${errors})