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.
cmake/Tests/RunCMake/GenEx-LIST/REMOVE_DUPLICATES.cmake.in

21 lines
546 B

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