summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
blob: cd0749487453a8905c9688fc9b4ca5574ace24c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
set(windows_cmd "a \"b c\" 'd e' \";\" \\ \"c:\\windows\\path\\\\\" \\\"")
set(windows_exp "a;b c;'d;e';\;;\\;c:\\windows\\path\\;\"")
separate_arguments(windows_out WINDOWS_COMMAND "${windows_cmd}")

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

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