[vcpkg] Fix prettify output not working in some cases (#12717)

If you changed VCPKG_TARGET_ARCHITECTURE to use x86_64, the prettify command failed to parse things properly. This was found during the changes made for #12657 and was completed by @strega-nil (thanks!).
This commit is contained in:
Deadpikle 2020-08-05 16:03:34 -04:00 committed by GitHub
parent 6659efca6a
commit 2ade39048c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,10 +16,10 @@
macro(vcpkg_prettify_command INPUT_VAR OUTPUT_VAR)
set(${OUTPUT_VAR} "")
foreach(v ${${INPUT_VAR}})
if(${v} MATCHES "( )")
list(APPEND ${OUTPUT_VAR} \"${v}\")
if(v MATCHES "( )")
list(APPEND ${OUTPUT_VAR} "\"${v}\"")
else()
list(APPEND ${OUTPUT_VAR} ${v})
list(APPEND ${OUTPUT_VAR} "${v}")
endif()
endforeach()
list(JOIN ${OUTPUT_VAR} " " ${OUTPUT_VAR})