aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSilvio <silvio.traversaro@iit.it>2017-01-05 23:37:37 +0100
committerSilvio <silvio.traversaro@iit.it>2017-01-05 23:46:43 +0100
commitf4c34bb42dd0fe8217d4d54a9a4a2eeecdb0f0f4 (patch)
tree7b62ab5fc09c09f05455ac63922caa8290e906a8 /scripts
parent64e1bf8de73d18c85776c4cce2f40281f3ebb253 (diff)
downloadvcpkg-f4c34bb42dd0fe8217d4d54a9a4a2eeecdb0f0f4.tar.gz
vcpkg-f4c34bb42dd0fe8217d4d54a9a4a2eeecdb0f0f4.zip
vcpkg_apply_patches: add QUIET option
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_apply_patches.cmake25
1 files changed, 23 insertions, 2 deletions
diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake
index cd3026b6a..d509e36ec 100644
--- a/scripts/cmake/vcpkg_apply_patches.cmake
+++ b/scripts/cmake/vcpkg_apply_patches.cmake
@@ -1,5 +1,26 @@
+#.rst:
+# .. command:: vcpkg_apply_patches
+#
+# Apply a set of patches to a source tree.
+#
+# ::
+# vcpkg_apply_patches(SOURCE_PATH <source_path>
+# PATCHES patch1 [patch ...]
+# )
+#
+# ``SOURCE_PATH``
+# The source path in which apply the patches.
+# ``PATCHES``
+# A list of patches that are applied to the source tree
+# ``QUIET``
+# If this option is passed, the warning message when applyng
+# a patch failes is not printed. This is convenient for patches
+# that are known to fail even on a clean source tree, and for
+# which the standard warning message would be confusing for the user.
+#
+
function(vcpkg_apply_patches)
- cmake_parse_arguments(_ap "" "SOURCE_PATH" "PATCHES" ${ARGN})
+ cmake_parse_arguments(_ap "QUIET" "SOURCE_PATH" "PATCHES" ${ARGN})
find_program(GIT git)
set(PATCHNUM 0)
@@ -14,7 +35,7 @@ function(vcpkg_apply_patches)
RESULT_VARIABLE error_code
)
- if(error_code)
+ if(error_code AND NOT ${_ap_QUIET})
message(STATUS "Applying patch failed. This is expected if this patch was previously applied.")
endif()