You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
498 B

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()