Skip to content

Commit d6d5d0d

Browse files
authored
Remove logs in get_cpm.cmake script (#508)
* remove all logs from get_cpm.cmake * simplify get_cpm.cmake script
1 parent 16c6a3b commit d6d5d0d

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

cmake/get_cpm.cmake

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,9 @@ endif()
1616
# Expand relative path. This is important if the provided path contains a tilde (~)
1717
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
1818

19-
message(STATUS "Using CPM at ${CPM_DOWNLOAD_LOCATION}")
20-
21-
file(
22-
DOWNLOAD
23-
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
24-
${CPM_DOWNLOAD_LOCATION}
25-
STATUS CPM_DOWNLOAD_STATUS
26-
EXPECTED_HASH SHA256=${CPM_HASH_SUM}
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}
2722
)
2823

29-
list(GET CPM_DOWNLOAD_STATUS 0 CPM_DOWNLOAD_STATUS_CODE)
30-
if(NOT ${CPM_DOWNLOAD_STATUS_CODE} EQUAL 0)
31-
# give a fatal error when download fails
32-
list(GET CPM_DOWNLOAD_STATUS 1 CPM_DOWNLOAD_ERROR_MESSAGE)
33-
message(FATAL_ERROR "Error occurred during download of CPM: ${CPM_DOWNLOAD_ERROR_MESSAGE}")
34-
endif()
35-
3624
include(${CPM_DOWNLOAD_LOCATION})

0 commit comments

Comments
 (0)