vcpkg/scripts/cmake/vcpkg_prettify_command.cmake
nicole mazzuca 6b117c9c7e
[vcpkg docs] Check for documentation generation in CI (#14614)
* [vcpkg docs] Change how documenting port functions works

Instead of using `##`, use comment blocks for documentation.

Also, add some minor docs and change RST -> MD
so we actually get docs generated.

* add CI stuff

* regenerate docs

* fix vcpkg_find_acquire_program to not use _execute_process
2020-12-01 13:37:26 -08:00

29 lines
723 B
CMake

#[===[.md:
# vcpkg_prettify_command
Turns list of command arguments into a formatted string.
## Usage
```cmake
vcpkg_prettify_command(<INPUT_VAR> <OUTPUT_VAR>)
```
## 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()