summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/separate_arguments/UnixCommand.cmake
blob: c56cd632dc320302be9bfd15e5474a85ae644b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
set(unix_cmd "a \"b c\" 'd e' \";\" \\ \\'\\\" '\\'' \"\\\"\"")
set(unix_exp "a;b c;d e;\;; '\";';\"")
separate_arguments(unix_out UNIX_COMMAND "${unix_cmd}")

if(NOT "${unix_out}" STREQUAL "${unix_exp}")
  message(FATAL_ERROR "separate_arguments unix-style failed.  "
    "Expected\n  [${unix_exp}]\nbut got\n  [${unix_out}]\n")
endif()

separate_arguments(empty_out UNIX_COMMAND)
if(NOT empty_out STREQUAL "")
  message(FATAL_ERROR "separate_arguments unix-style failed on no arguments")
endif()