list — CMake 3.23.0-rc4 Documentation
cmake.org › cmake › helplist (JOIN <list> <glue> <output variable>) New in version 3.12. Returns a string joining all list's elements using the glue string. To join multiple strings, which are not part of a list, use JOIN operator from string () command. list (SUBLIST <list> <begin> <length> <output variable>) New in version 3.12. Returns a sublist of the given list.
CMake: Output a list with delimiters - Stack Overflow
stackoverflow.com › questions › 17666003Jul 16, 2013 · You could write a function to join the items of a list together with a delimiter, and then print that out instead. For example, such a function: 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)
list — CMake 3.23.0-rc4 Documentation
https://cmake.org/cmake/help/latest/command/list.htmlNote. When specifying index values, if <element index> is 0 or greater, it is indexed from the beginning of the list, with 0 representing the first list element. If <element index> is -1 or lesser, it is indexed from the end of the list, with -1 representing the last list element. Be careful when counting with negative indices: they do not start from 0. -0 is equivalent to 0, the first list elem