2021-02-13 09:53:17 +08:00
|
|
|
function(z_vcpkg_prettify_command_line out_var)
|
|
|
|
set(output_list "")
|
|
|
|
z_vcpkg_function_arguments(args 1)
|
|
|
|
foreach(v IN LISTS args)
|
2021-02-10 07:53:36 +08:00
|
|
|
string(REPLACE [[\]] [[\\]] v "${v}")
|
|
|
|
if(v MATCHES "( )")
|
|
|
|
string(REPLACE [["]] [[\"]] v "${v}")
|
2021-02-13 09:53:17 +08:00
|
|
|
list(APPEND output_list "\"${v}\"")
|
2021-02-10 07:53:36 +08:00
|
|
|
else()
|
2021-02-13 09:53:17 +08:00
|
|
|
list(APPEND output_list "${v}")
|
2021-02-10 07:53:36 +08:00
|
|
|
endif()
|
|
|
|
endforeach()
|
2021-02-13 09:53:17 +08:00
|
|
|
list(JOIN output_list " " output)
|
|
|
|
set("${out_var}" "${output}" PARENT_SCOPE)
|
2021-02-10 07:53:36 +08:00
|
|
|
endfunction()
|