On Tue, Jul 05, 2016 at 19:49:46 +0300, Ruslan Baratov wrote: > Archive can be unpacked by "cmake -E tar xf" which detect type > automatically as far as I understand. At least this one used internally > by ExternalProject (see the testing I've made before).
CMake is not my go-to tool for extracting files though (and similarly for others I imagine), so running `tar xf archive.tar` and getting an error because it is actually a .tar.gz (or even a .zip) file is not nice. > So even if it seems that archive name is `|archive.tar.gz` it should be > downloaded to > `||gitlab-ce-v8.9.3-5e546d9b4728fc9c9623992a678cbea9eb2098f1.tar.gz`. So > I think it's easily can be file with another extension.| Here's another idea: add an `OUTPUT_FILE <var>` keyword argument to `file(DOWNLOAD)` to get the actual filename after content disposition resolution (probably similar for 30x rewrites). This would also be useful for things other than ExternalProject. --Ben -- 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