diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2019-11-22 09:47:40 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-22 09:47:40 -0800 |
| commit | 45f4b820e5743b89bca3508ba2028cdd5d8bbd17 (patch) | |
| tree | f874a8c4a7392309bdbb86447288597ec0a4a281 /scripts/cmake/vcpkg_prettify_command.cmake | |
| parent | 62d67d3bf8eeff1afa8009041fd08b8822676b7b (diff) | |
| parent | 8831e8f25f1ff6546ee4a5291b91d599421637b3 (diff) | |
| download | vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.tar.gz vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.zip | |
Merge branch 'master' into vcpkg_nuget
Diffstat (limited to 'scripts/cmake/vcpkg_prettify_command.cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_prettify_command.cmake | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_prettify_command.cmake b/scripts/cmake/vcpkg_prettify_command.cmake new file mode 100644 index 000000000..9d9a2b798 --- /dev/null +++ b/scripts/cmake/vcpkg_prettify_command.cmake @@ -0,0 +1,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()
|
