[cmake-developers] [CMake 0016082]: Support alternative download URL in ExternalProject_Add
Brad King
brad.king at kitware.com
Mon May 2 10:07:48 EDT 2016
On 04/29/2016 03:40 PM, A. Klitzing wrote:
> I APPEND the log of every failed download and print that only if no
> URL works now. So we reserve the detailed error log of a single
> download attempt.
Thanks. I added the test case with the patch below and
it causes the ExternalProjectLocal test to fail. The
download tries both alternatives "a;b" as a single URL.
Also it looks like _ep_add_download_command has a lot
of logic that inspects the URL value. Your change will
need to account for multiple values there as well. I think
it may be a bit more involved than the patch so far.
Thanks,
-Brad
diff --git a/Tests/ExternalProjectLocal/CMakeLists.txt b/Tests/ExternalProjectLocal/CMakeLists.txt
index 17f1630..9d4d98b 100644
--- a/Tests/ExternalProjectLocal/CMakeLists.txt
+++ b/Tests/ExternalProjectLocal/CMakeLists.txt
@@ -126,7 +126,8 @@ ExternalProject_Add_Step(${proj} mypatch
#
set(proj TutorialStep1-LocalTGZ)
ExternalProject_Add(${proj}
- URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tgz"
+ URL "${CMAKE_CURRENT_SOURCE_DIR}/missing/Step1.tgz" # need alternate
+ "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tgz"
URL_MD5 38c648e817339c356f6be00eeed79bd0
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR>
INSTALL_COMMAND ""
More information about the cmake-developers
mailing list