File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change 1
- set (CPM_DOWNLOAD_VERSION 0.38.2 )
1
+ # SPDX-License-Identifier: MIT
2
+ #
3
+ # SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors
4
+
5
+ set (CPM_DOWNLOAD_VERSION 0.38.6 )
6
+ set (CPM_HASH_SUM "11c3fa5f1ba14f15d31c2fb63dbc8628ee133d81c8d764caad9a8db9e0bacb07" )
2
7
3
8
if (CPM_SOURCE_CACHE )
4
9
set (CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE} /cpm/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
@@ -11,21 +16,7 @@ endif()
11
16
# Expand relative path. This is important if the provided path contains a tilde (~)
12
17
get_filename_component (CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE )
13
18
14
- function (download_cpm )
15
- message (STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION} " )
16
- file (DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
17
- ${CPM_DOWNLOAD_LOCATION} )
18
- endfunction ()
19
-
20
- if (NOT (EXISTS ${CPM_DOWNLOAD_LOCATION} ))
21
- download_cpm ()
22
- else ()
23
- # resume download if it previously failed
24
- file (READ ${CPM_DOWNLOAD_LOCATION} check )
25
- if ("${check} " STREQUAL "" )
26
- download_cpm ()
27
- endif ()
28
- unset (check )
29
- endif ()
19
+ file (DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
20
+ ${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM} )
30
21
31
22
include (${CPM_DOWNLOAD_LOCATION} )
You can’t perform that action at this time.
0 commit comments