blob: 9d9a2b798c8daa7c4421637d47990c6ae4b0ef2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
## # vcpkg_prettify_command
##
## Turns list of command arguments into a formatted string.
##
## ## Usage
## ```cmake
## vcpkg_prettify_command()
## ```
##
## ## 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()
|