tgcalls_cli/cmake/Join.cmake
2023-02-25 21:06:06 +01:00

12 lines
320 B
CMake

function(Join output_var list glue)
set(result "")
foreach(item ${list})
string(LENGTH "${result}" len)
if (${len} EQUAL 0)
string(APPEND result "${item}")
else()
string(APPEND result "${glue}${item}")
endif()
endforeach()
set(${output_var} "${result}" PARENT_SCOPE)
endfunction(Join)