
function (ListToString result delim)
  list(GET ARGV 2 temp)
  math(EXPR N "${ARGC}-1")
  foreach(IDX RANGE 3 ${N})
    list(GET ARGV ${IDX} STR)
        set(temp "${temp}${delim}${STR}")
  endforeach()
  set(${result} "${temp}" PARENT_SCOPE)
endfunction(ListToString)
