diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:24 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:24 +0900 |
commit | e42c4abb646a39cdd5d1ccb22a9619990ce2a898 (patch) | |
tree | 5c4a99e76409f26c9525137e845d0bac7efa8c7b /Tests/RunCMake/list/JOIN.cmake | |
parent | 07408dd83a3637a29a56a7d5fbe49f63cbb41e8f (diff) | |
download | cmake-e42c4abb646a39cdd5d1ccb22a9619990ce2a898.tar.gz cmake-e42c4abb646a39cdd5d1ccb22a9619990ce2a898.tar.bz2 cmake-e42c4abb646a39cdd5d1ccb22a9619990ce2a898.zip |
Imported Upstream version 3.12.0upstream/3.12.0
Diffstat (limited to 'Tests/RunCMake/list/JOIN.cmake')
-rw-r--r-- | Tests/RunCMake/list/JOIN.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/list/JOIN.cmake b/Tests/RunCMake/list/JOIN.cmake new file mode 100644 index 000000000..24a623e66 --- /dev/null +++ b/Tests/RunCMake/list/JOIN.cmake @@ -0,0 +1,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() |