2019-07-02 04:30:24 +08:00
|
|
|
## # vcpkg_prettify_command
|
|
|
|
##
|
|
|
|
## Turns list of command arguments into a formatted string.
|
|
|
|
##
|
|
|
|
## ## Usage
|
|
|
|
## ```cmake
|
2020-02-13 07:58:43 +08:00
|
|
|
## vcpkg_prettify_command(<INPUT_VAR> <OUTPUT_VAR>)
|
2019-07-02 04:30:24 +08:00
|
|
|
## ```
|
|
|
|
##
|
|
|
|
## ## Examples
|
|
|
|
##
|
|
|
|
## * `scripts/cmake/vcpkg_execute_build_process.cmake`
|
|
|
|
## * `scripts/cmake/vcpkg_execute_required_process.cmake`
|
|
|
|
## * `scripts/cmake/vcpkg_execute_required_process_repeat.cmake`
|
|
|
|
|
|
|
|
macro(vcpkg_prettify_command INPUT_VAR OUTPUT_VAR)
|
|
|
|
set(${OUTPUT_VAR} "")
|
|
|
|
foreach(v ${${INPUT_VAR}})
|
|
|
|
if(${v} MATCHES "( )")
|
|
|
|
list(APPEND ${OUTPUT_VAR} \"${v}\")
|
|
|
|
else()
|
|
|
|
list(APPEND ${OUTPUT_VAR} ${v})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
list(JOIN ${OUTPUT_VAR} " " ${OUTPUT_VAR})
|
|
|
|
endmacro()
|