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