MantisBT - CMake
View Issue Details
0015590CMakeModulespublic2015-05-28 10:272016-02-01 09:10
Daniele E. Domenichelli 
Daniele E. Domenichelli 
lowtweakalways
closedfixed 
CMake 3.2.2 
CMake 3.4 
0015590: ExternalProject inits all submodules
At the moment ExternalProject is initializing all the submodules of a git repository, even if the user only wants to checkout a subset of submodules.

With this patch, it initializes only the selected submodules, reducing the waiting time for repositories with many submodules (such as https://github.com/boostorg/boost [^]).

Topic: ExternalProject_init_selected_submodules

  ExternalProject: Init only selected git submodules
  http://www.cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=6d5aded [^]


I'm not the author of the patch (as you can see from git commit author). It looks good to me, since the "git submodule update" already downloads only the selected submodules.
No tags attached.
related to 0015592closed Kitware Robot ExternalProject does not allow NOT to init all the submodules 
Issue History
2015-05-28 10:27Daniele E. DomenichelliNew Issue
2015-05-28 10:27Daniele E. DomenichelliStatusnew => assigned
2015-05-28 10:27Daniele E. DomenichelliAssigned To => Daniele E. Domenichelli
2015-05-28 11:30Brad KingNote Added: 0038811
2015-05-28 13:46Daniele E. DomenichelliNote Added: 0038813
2015-05-28 13:47Daniele E. DomenichelliNote Added: 0038814
2015-05-28 13:56Brad KingNote Added: 0038815
2015-05-28 14:04Daniele E. DomenichelliNote Added: 0038816
2015-05-29 08:35Brad KingRelationship addedrelated to 0015592
2015-06-02 14:33Brad KingNote Added: 0038875
2015-09-25 12:05Daniele E. DomenichelliStatusassigned => resolved
2015-09-25 12:05Daniele E. DomenichelliFixed in Version => CMake 3.4
2015-09-25 12:05Daniele E. DomenichelliResolutionopen => fixed
2016-02-01 09:10Robert MaynardNote Added: 0040421
2016-02-01 09:10Robert MaynardStatusresolved => closed

Notes
(0038811)
Brad King   
2015-05-28 11:30   
Please mention in the commit message that the GIT_SUBMODULES option was added by commit v3.0.0-rc1~92^2 (ExternalProject: Add option GIT_SUBMODULES, 2014-01-09). For reference, that is:

 ExternalProject: Add option GIT_SUBMODULES
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=819015ef [^]

It looks like the test suite is a bit light on actually covering this. Please look at extending it to cover cases with actual explicit submodule lists and verify that only the desired subset appears.
(0038813)
Daniele E. Domenichelli   
2015-05-28 13:46   
Topic updated:

  ExternalProject: Init only selected git submodules
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f77198a [^]

  ExternalProject: Add unit tests for GIT_SUBMODULES argument
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7b81a9 [^]
  
While adding the unit tests, I could not find a way skip all the submodules. Is this a wanted behaviour?
(0038814)
Daniele E. Domenichelli   
2015-05-28 13:47   
Sorry...

  ExternalProject: Init only selected git submodules
  http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=f77198a [^] [^]

  ExternalProject: Add unit tests for GIT_SUBMODULES argument
  http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=d7b81a9 [^] [^]
(0038815)
Brad King   
2015-05-28 13:56   
Re 0015590:0038813: I think the way to skip all modules is to just not run "git submodule" at all. I think this would be desired behavior when an explicit empty GIT_SUBMODULES is specified. Unfortunately that would be a change in behavior now and should have been considered when GIT_SUBMODULES was first added.
(0038816)
Daniele E. Domenichelli   
2015-05-28 14:04   
Reported as a different bug, since it is not related to this issue... See 0015592
(0038875)
Brad King   
2015-06-02 14:33   
I've rebased on 'master', revised the commit messages, and merged to 'next' for testing:

 ExternalProject: Initialize only selected git submodules
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=14e2c3ad [^]

 ExternalProject: Add unit tests for GIT_SUBMODULES argument
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19e5e0ba [^]
(0040421)
Robert Maynard   
2016-02-01 09:10   
Closing resolved issues that have not been updated in more than 4 months.