summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/list/JOIN.cmake
blob: 24a623e6680f1030cb694353d8374b1c3daebeb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
list(JOIN undefList % out)
if(NOT out STREQUAL "")
  message(FATAL_ERROR "\"list(JOIN undefList % out)\" set out to \"${out}\"")
endif()
set(myList a)
list(JOIN myList % out)
if(NOT out STREQUAL "a")
  message(FATAL_ERROR "\"list(JOIN \"a\" % out)\" set out to \"${out}\"")
endif()
set(myList a b)
list(JOIN myList % out)
if(NOT out STREQUAL "a%b")
  message(FATAL_ERROR "\"list(JOIN \"a;b\" % out)\" set out to \"${out}\"")
endif()
list(JOIN myList "" out)
if(NOT out STREQUAL "ab")
  message(FATAL_ERROR "\"list(JOIN \"a;b\" \"\" out a)\" set out to \"${out}\"")
endif()