include ("${RunCMake_SOURCE_DIR}/check_errors.cmake") unset (errors) set(listvar alpha bravo charlie delta) list(TRANSFORM listvar PREPEND "P_" OUTPUT_VARIABLE reference) set (output "$") if (NOT output STREQUAL reference) list (APPEND errors "returns bad value: ${output}") endif() list(TRANSFORM listvar PREPEND "P_" AT 1 3 OUTPUT_VARIABLE reference) set (output "$") if (NOT output STREQUAL reference) list (APPEND errors "returns bad value: ${output}") endif() list(TRANSFORM listvar PREPEND "P_" AT 1 -2 OUTPUT_VARIABLE reference) set (output "$") if (NOT output STREQUAL reference) list (APPEND errors "returns bad value: ${output}") endif() list(TRANSFORM listvar PREPEND "P_" FOR 1 2 OUTPUT_VARIABLE reference) set (output "$") if (NOT output STREQUAL reference) list (APPEND errors "returns bad value: ${output}") endif() list(TRANSFORM listvar PREPEND "P_" FOR 1 -1 OUTPUT_VARIABLE reference) set (output "$") if (NOT output STREQUAL reference) list (APPEND errors "returns bad value: ${output}") endif() list(TRANSFORM listvar PREPEND "P_" FOR 1 -1 2 OUTPUT_VARIABLE reference) set (output "$") if (NOT output STREQUAL reference) list (APPEND errors "returns bad value: ${output}") endif() list(TRANSFORM listvar PREPEND "P_" REGEX "(r|t)a" OUTPUT_VARIABLE reference) set (output "$") if (NOT output STREQUAL reference) list (APPEND errors "returns bad value: ${output}") endif() check_errors("LIST:TRANSFORM,PREPEND..." ${errors})