File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed
Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change 1- set (CPM_DOWNLOAD_VERSION 0.37.0)
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.5)
6+ set (CPM_HASH_SUM "192aa0ccdc57dfe75bd9e4b176bf7fb5692fd2b3e3f7b09c74856fc39572b31c" )
27
38if (CPM_SOURCE_CACHE)
49 set (CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE} /cpm/CPM_${CPM_DOWNLOAD_VERSION} .cmake" )
@@ -11,22 +16,9 @@ endif()
1116# Expand relative path. This is important if the provided path contains a tilde (~)
1217get_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
17- https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION} /CPM.cmake
18- ${CPM_DOWNLOAD_LOCATION}
19- )
20- endfunction ()
21-
22- if (NOT (EXISTS ${CPM_DOWNLOAD_LOCATION} ))
23- download_cpm()
24- else ()
25- # resume download if it previously failed
26- file (READ ${CPM_DOWNLOAD_LOCATION} check)
27- if ("${check} " STREQUAL "" )
28- download_cpm()
29- endif ()
30- endif ()
19+ file (DOWNLOAD
20+ https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION} /CPM.cmake
21+ ${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
22+ )
3123
3224include (${CPM_DOWNLOAD_LOCATION} )
You can’t perform that action at this time.
0 commit comments