From f0e3431bc7c2ef3ab5834b1fa36e7a8d1e99184d Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 21 Jun 2017 19:03:17 +0300 Subject: [PATCH 1/2] .gitignore: added ".cache" directory back It is necessary for proper work of "git clean" command --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c1b1fe642f..89c7530039 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ bin/ *.log *.tlog build +.cache From d29c299cdbcec49470f65dab767bd433ad9f1720 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 21 Jun 2017 19:04:27 +0300 Subject: [PATCH 2/2] cmake: additional messages on download errors --- cmake/OpenCVDownload.cmake | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake index 76151bb8ed..67a416cb4b 100644 --- a/cmake/OpenCVDownload.cmake +++ b/cmake/OpenCVDownload.cmake @@ -167,7 +167,28 @@ function(ocv_download) set(${DL_STATUS} FALSE PARENT_SCOPE) set(msg_level WARNING) endif() - message(${msg_level} "${__msg_prefix}Download failed: ${status}") + if(status MATCHES "Couldn't resolve host name") + message(STATUS " +======================================================================= + Couldn't download files from the Internet. + Please check the Internet access on this host. +======================================================================= +") + elseif(status MATCHES "Couldn't connect to server") + message(STATUS " +======================================================================= + Couldn't connect to server from the Internet. + Perhaps direct connections are not allowed in the current network. + To use proxy please check/specify these environment variables: + - http_proxy/https_proxy + - and/or HTTP_PROXY/HTTPS_PROXY +======================================================================= +") + endif() + message(${msg_level} "${__msg_prefix}Download failed: ${status} +For details please refer to the download log file: +${OPENCV_DOWNLOAD_LOG} +") return() endif()