Skip to content

Commit 31c9b39

Browse files
committed
CMake: provide a log of what went wrong when not able to download a package.
1 parent 4c3cbf7 commit 31c9b39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/packages.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function(retrieve_package PACKAGE_NAME PACKAGE_VERSION PACKAGE_REPOSITORY RELEAS
198198
set(PACKAGE_URL "https://github.com/agarny/${PACKAGE_REPOSITORY}/releases/download/707e211/${PACKAGE_FILE}")
199199
endif()
200200

201-
file(DOWNLOAD ${PACKAGE_URL} ${REAL_PACKAGE_FILE} STATUS STATUS)
201+
file(DOWNLOAD ${PACKAGE_URL} ${REAL_PACKAGE_FILE} LOG LOG STATUS STATUS)
202202

203203
# Uncompress the package, should we have managed to retrieve it.
204204

@@ -234,7 +234,7 @@ function(retrieve_package PACKAGE_NAME PACKAGE_VERSION PACKAGE_REPOSITORY RELEAS
234234
file(REMOVE_RECURSE ${INSTALL_DIR})
235235

236236
message(STATUS "Retrieving Package ${PACKAGE_NAME} - Failed")
237-
message(FATAL_ERROR "The ${PACKAGE_NAME} package could not be retrieved from ${PACKAGE_URL}.")
237+
message(FATAL_ERROR "The ${PACKAGE_NAME} package could not be retrieved from ${PACKAGE_URL}.\n${LOG}")
238238
endif()
239239
endif()
240240

0 commit comments

Comments
 (0)