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.

36 lines
825 B

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