Attaching rebased patch.

Thanks!

On 06-Jul-16 17:36, Brad King wrote:
On 07/05/2016 05:14 PM, Ruslan Baratov wrote:
if it will work in most cases then why not? Most users will not
even notice this.
Okay.  The changes for the new pattern are now in `master` and
are worthwhile regardless of having a default filename fallback
because they help extract a more readable name in more cases.

Please rebase your default filename fallback on that.

Thanks,
-Brad


>From a3af0310b3a705a76a3f308b88b4a52a3d64d06e Mon Sep 17 00:00:00 2001
From: Ruslan Baratov <ruslan_bara...@yahoo.com>
Date: Tue, 5 Jul 2016 16:17:12 +0300
Subject: [PATCH] Use default filename if extracting from URL failed

---
 Modules/ExternalProject.cmake | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index ee517f6..ea11388 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1878,7 +1878,10 @@ function(_ep_add_download_command name)
         elseif(no_extract)
           get_filename_component(fname "${fname}" NAME)
         else()
-          message(FATAL_ERROR "Could not extract tarball filename from url:\n  ${url}")
+          # Do not put warning message here. If everything works OK it will
+          # only distract. If unpack will fail the standard name can be found in logs.
+          # (see _ep_write_extractfile_script function)
+          set(fname "archive.tar")
         endif()
         string(REPLACE ";" "-" fname "${fname}")
         set(file ${download_dir}/${fname})
-- 
1.9.1

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to