diff options
Diffstat (limited to 'Tests/RunCMake/string/Concat.cmake')
-rw-r--r-- | Tests/RunCMake/string/Concat.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/string/Concat.cmake b/Tests/RunCMake/string/Concat.cmake new file mode 100644 index 0000000..7260c95 --- /dev/null +++ b/Tests/RunCMake/string/Concat.cmake @@ -0,0 +1,19 @@ +set(b b) +set(out x) +string(CONCAT out) +if(NOT out STREQUAL "") + message(FATAL_ERROR "\"string(CONCAT out)\" set out to \"${out}\"") +endif() +string(CONCAT out a) +if(NOT out STREQUAL "a") + message(FATAL_ERROR "\"string(CONCAT out a)\" set out to \"${out}\"") +endif() +string(CONCAT out a "b") +if(NOT out STREQUAL "ab") + message(FATAL_ERROR "\"string(CONCAT out a \"b\")\" set out to \"${out}\"") +endif() +string(CONCAT out a "${b}" [[ +${c}]]) +if(NOT out STREQUAL "ab\${c}") + message(FATAL_ERROR "\"string(CONCAT out a \"\${b}\" [[\${c}]])\" set out to \"${out}\"") +endif() |