Skip to content

Commit d8e845f

Browse files
authored
chore: bump CPM.cmake to v0.38.6 (#50)
1 parent 14b23dd commit d8e845f

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

error/cmake/CPM.cmake

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
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")
27

38
if(CPM_SOURCE_CACHE)
49
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
@@ -11,21 +16,7 @@ endif()
1116
# Expand relative path. This is important if the provided path contains a tilde (~)
1217
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
1318

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})
3021

3122
include(${CPM_DOWNLOAD_LOCATION})

0 commit comments

Comments
 (0)