mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-27 22:57:21 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee6d879a50 | ||
|
|
d6d5d0d5ab |
@@ -1095,12 +1095,15 @@ function(cpm_prettify_package_arguments OUT_VAR IS_IN_COMMENT)
|
|||||||
DOWNLOAD_ONLY
|
DOWNLOAD_ONLY
|
||||||
GITHUB_REPOSITORY
|
GITHUB_REPOSITORY
|
||||||
GITLAB_REPOSITORY
|
GITLAB_REPOSITORY
|
||||||
|
BITBUCKET_REPOSITORY
|
||||||
GIT_REPOSITORY
|
GIT_REPOSITORY
|
||||||
SOURCE_DIR
|
SOURCE_DIR
|
||||||
FIND_PACKAGE_ARGUMENTS
|
FIND_PACKAGE_ARGUMENTS
|
||||||
NO_CACHE
|
NO_CACHE
|
||||||
SYSTEM
|
SYSTEM
|
||||||
GIT_SHALLOW
|
GIT_SHALLOW
|
||||||
|
EXCLUDE_FROM_ALL
|
||||||
|
SOURCE_SUBDIR
|
||||||
)
|
)
|
||||||
set(multiValueArgs URL OPTIONS DOWNLOAD_COMMAND)
|
set(multiValueArgs URL OPTIONS DOWNLOAD_COMMAND)
|
||||||
cmake_parse_arguments(CPM_ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
cmake_parse_arguments(CPM_ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|||||||
@@ -16,21 +16,9 @@ endif()
|
|||||||
# Expand relative path. This is important if the provided path contains a tilde (~)
|
# Expand relative path. This is important if the provided path contains a tilde (~)
|
||||||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
|
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
|
||||||
|
|
||||||
message(STATUS "Using CPM at ${CPM_DOWNLOAD_LOCATION}")
|
file(DOWNLOAD
|
||||||
|
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
||||||
file(
|
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
|
||||||
DOWNLOAD
|
|
||||||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
|
||||||
${CPM_DOWNLOAD_LOCATION}
|
|
||||||
STATUS CPM_DOWNLOAD_STATUS
|
|
||||||
EXPECTED_HASH SHA256=${CPM_HASH_SUM}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
list(GET CPM_DOWNLOAD_STATUS 0 CPM_DOWNLOAD_STATUS_CODE)
|
|
||||||
if(NOT ${CPM_DOWNLOAD_STATUS_CODE} EQUAL 0)
|
|
||||||
# give a fatal error when download fails
|
|
||||||
list(GET CPM_DOWNLOAD_STATUS 1 CPM_DOWNLOAD_ERROR_MESSAGE)
|
|
||||||
message(FATAL_ERROR "Error occurred during download of CPM: ${CPM_DOWNLOAD_ERROR_MESSAGE}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(${CPM_DOWNLOAD_LOCATION})
|
include(${CPM_DOWNLOAD_LOCATION})
|
||||||
|
|||||||
Reference in New Issue
Block a user