summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject/verify.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/ExternalProject/verify.cmake.in')
-rw-r--r--Modules/ExternalProject/verify.cmake.in22
1 files changed, 16 insertions, 6 deletions
diff --git a/Modules/ExternalProject/verify.cmake.in b/Modules/ExternalProject/verify.cmake.in
index f37059b..cd34ba9 100644
--- a/Modules/ExternalProject/verify.cmake.in
+++ b/Modules/ExternalProject/verify.cmake.in
@@ -3,6 +3,10 @@
cmake_minimum_required(VERSION 3.5)
+set(quiet "@quiet@")
+set(script_dir "@CMAKE_CURRENT_FUNCTION_LIST_DIR@/ExternalProject")
+include(${script_dir}/captured_process_setup.cmake)
+
if("@LOCAL@" STREQUAL "")
message(FATAL_ERROR "LOCAL can't be empty")
endif()
@@ -13,22 +17,27 @@ endif()
function(do_verify)
if("@ALGO@" STREQUAL "")
- message(WARNING "File will not be verified since no URL_HASH specified")
+ _ep_message_quiet_capture(WARNING
+ "File will not be verified since no URL_HASH specified"
+ )
+ set(accumulated_output "${accumulated_output}" PARENT_SCOPE)
return()
endif()
if("@EXPECT_VALUE@" STREQUAL "")
- message(FATAL_ERROR "EXPECT_VALUE can't be empty")
+ _ep_message_quiet_capture(FATAL_ERROR "EXPECT_VALUE can't be empty")
endif()
- message(STATUS
+ _ep_message_quiet_capture(STATUS
"verifying file...
- file='@LOCAL@'")
+ file='@LOCAL@'"
+ )
+ set(accumulated_output "${accumulated_output}" PARENT_SCOPE)
file("@ALGO@" "@LOCAL@" actual_value)
if(NOT "${actual_value}" STREQUAL "@EXPECT_VALUE@")
- message(FATAL_ERROR
+ _ep_message_quiet_capture(FATAL_ERROR
"error: @ALGO@ hash of
@LOCAL@
does not match expected value
@@ -37,7 +46,8 @@ does not match expected value
")
endif()
- message(STATUS "verifying file... done")
+ _ep_message_quiet_capture(STATUS "verifying file... done")
+ set(accumulated_output "${accumulated_output}" PARENT_SCOPE)
endfunction()
do_verify()