2 separate_arguments(old_out)
5 set(unix_cmd "a \"b c\" 'd e' \";\" \\ \\'\\\" '\\'' \"\\\"\"")
6 set(unix_exp "a;b c;d e;\;; '\";';\"")
7 separate_arguments(unix_out UNIX_COMMAND "${unix_cmd}")
9 set(windows_cmd "a \"b c\" 'd e' \";\" \\ \"c:\\windows\\path\\\\\" \\\"")
10 set(windows_exp "a;b c;'d;e';\;;\\;c:\\windows\\path\\;\"")
11 separate_arguments(windows_out WINDOWS_COMMAND "${windows_cmd}")
13 foreach(mode old unix windows)
14 if(NOT "${${mode}_out}" STREQUAL "${${mode}_exp}")
15 message(FATAL_ERROR "separate_arguments ${mode}-style failed. "
16 "Expected\n [${${mode}_exp}]\nbut got\n [${${mode}_out}]\n")
21 separate_arguments(nothing)
23 message(FATAL_ERROR "separate_arguments null-case failed: "
24 "nothing=[${nothing}]")