Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / cmake / download.cmake
1 # Copyright (C) 2018-2019 Intel Corporation
2 #
3 # SPDX-License-Identifier: Apache-2.0
4 #
5
6 function (Download from to fatal result output)
7
8   if((NOT EXISTS "${to}"))
9     message(STATUS "Downloading from ${from} to ${to} ...")
10     file(DOWNLOAD ${from} ${to}
11       TIMEOUT 3600
12       LOG log
13       STATUS status
14       SHOW_PROGRESS)
15
16     set (${output} ${status} PARENT_SCOPE)
17   else()
18     set (${output} 0 PARENT_SCOPE)
19   endif()
20   set(${result} "ON" PARENT_SCOPE)
21
22 endfunction(Download)
23
24 include ("download_and_apply")
25 include ("download_and_extract")