blob: 0a564507be4ffe5703a84a87a69a0ab9612cdb9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
unset (errors)
set(listvar a b c d)
list(JOIN listvar ":" reference)
set (output "$<LIST:JOIN,a;b;c;d,:>")
if (NOT output STREQUAL reference)
list (APPEND errors "returns bad value: ${output}")
endif()
list(JOIN listvar "" reference)
set (output "$<LIST:JOIN,a;b;c;d,>")
if (NOT output STREQUAL reference)
list (APPEND errors "returns bad value: ${output}")
endif()
set(listvar a)
list(JOIN listvar ":" reference)
set (output "$<LIST:JOIN,a,:>")
if (NOT output STREQUAL reference)
list (APPEND errors "returns bad value: ${output}")
endif()
unset(listvar)
list(JOIN listvar ":" reference)
set (output "$<LIST:JOIN,,:>")
if (NOT output STREQUAL reference)
list (APPEND errors "returns bad value: ${output}")
endif()
check_errors("LIST:JOIN..." ${errors})
|