On 05-Jul-16 18:50, Ben Boeckel wrote:
On Tue, Jul 05, 2016 at 18:43:25 +0300, Ruslan Baratov wrote:
By default not, goes to <project-name>-prefix/src/archive.tar .
Right, but if a download directory is set, this won't work. Can the
project name at least be added to the name?
If user are forcing directory then it is user's responsibility I think. For example GitHub releases goes without name of the project so both:

* https://github.com/ruslo/polly/archive/v0.10.1.tar.gz
* https://github.com/ruslo/hunter/archive/v0.10.1.tar.gz

will be downloaded to v0.10.1.tar.gz - this filename extracted from URL by CMake. In general patch made in a code branch where was FATAL_ERROR before, so it doesn't affect backward compatibility.


Though I'm partial to keeping the extension still; if I need to add a
patch to a project, it'd be nice if the extension weren't a lie when I
go to extract the tarball.
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).

Also note that in fact name of the file extracted from URL can differ from real:
|
> curl --head https://gitlab.com/gitlab-org/gitlab-ce/repository/archive.tar.gz\?ref\=v8.9.3 | grep file Content-Disposition: attachment; filename="gitlab-ce-v8.9.3-5e546d9b4728fc9c9623992a678cbea9eb2098f1.tar.gz"|

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.|

Ruslo
-- 

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