MantisBT - CMake
View Issue Details
0015799CMakeCMakepublic2015-10-19 07:312016-06-10 14:31
gonzalobg88@gmail.com 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0015799: Way to pass git options for cloning in ExternalProject_Add
AFAIK there is no way to pass git options while cloning repositories with ExternalProject_Add.

Cloning git repositories can take a very long time. Git has options that make cloning instantaneous if e.g. only one revision is required. For example: --depth 1 clones only the latest revision very fast.

I would like to be able to pass options to git clone since that would significantly improve my build times, which right now spend a very long time cloning the whole history of multiple git repositories.
No tags attached.
Issue History
2015-10-19 07:31gonzalobg88@gmail.comNew Issue
2015-10-19 11:11Ben BoeckelNote Added: 0039632
2015-10-19 11:14gonzalobg88@gmail.comNote Added: 0039633
2015-10-19 14:32Ben BoeckelNote Added: 0039640
2015-10-19 17:51gonzalobg88@gmail.comNote Added: 0039650
2015-10-19 18:07Ben BoeckelNote Added: 0039651
2016-06-10 14:29Kitware RobotNote Added: 0042860
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0039632)
Ben Boeckel   
2015-10-19 11:11   
It sounds like you want tarballs. Is there some use case where a git --depth 1 repo is preferred over a tarball?
(0039633)
gonzalobg88@gmail.com   
2015-10-19 11:14   
How is cloning the latest commit (and the latest commit only) from a git repository related to tarballs?

Is there a better git command for doing that?
(0039640)
Ben Boeckel   
2015-10-19 14:32   
I'm thinking of repos that are on hosting sites like Github or have a Gitweb interface where downloading a tarball of an arbitrary hash is available. If not, then --depth 1 is probably the best thing available.
(0039650)
gonzalobg88@gmail.com   
2015-10-19 17:51   
I seem thanks! Does CMake support downloading a tarbal for an arbitrary hash from github? If not that would be very useful as well!
(0039651)
Ben Boeckel   
2015-10-19 18:07   
It looks like if you don't provide a hash value, ExternalProject won't enforce it, but maybe I'm missing something. However, it also appears that it will *always* redownload the file since it can't verify it is valid. I think github has fixed their tarball stability problems at least, so providing a hash should there at least.
(0042860)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.