MantisBT - CMake
View Issue Details
0016083CMakeCMakepublic2016-04-26 17:132016-06-10 14:21
Ilya 
Brad King 
normalminoralways
closedfixed 
CMake 3.5.2 
CMake 3.6CMake 3.6 
0016083: ExternalProject with empty GIT_SUBMODULES does not initialize submodules of submodules
Current implementation uses the following command to get submodules:

1. `git submodule init`
2. `submodule update --recursive`

This is enough to initialize direct submodules of the repo, however it leaves submodules of submodules uninitialized.

To address this, [2] (and possibly [1]) must be changed to `submodule update --recursive --init`
1. Add an external project that has submodule which has its own submodule
2. Try to pull sources of this project
3. Check that submodule of submodule was not initialized
No tags attached.
patch ExternalProject.patch (743) 2016-04-26 19:05
https://public.kitware.com/Bug/file/5684/ExternalProject.patch
Issue History
2016-04-26 17:13IlyaNew Issue
2016-04-26 19:05IlyaFile Added: ExternalProject.patch
2016-04-27 08:21Brad KingAssigned To => Ben Boeckel
2016-04-27 08:21Brad KingStatusnew => assigned
2016-04-27 08:22Brad KingTarget Version => CMake 3.6
2016-04-29 13:36Brad KingTarget VersionCMake 3.6 =>
2016-04-29 13:37Brad KingNote Added: 0040947
2016-04-29 14:36IlyaNote Added: 0040948
2016-05-02 13:28Brad KingNote Added: 0041011
2016-05-02 13:28Brad KingAssigned ToBen Boeckel => Brad King
2016-05-02 13:28Brad KingStatusassigned => resolved
2016-05-02 13:28Brad KingResolutionopen => fixed
2016-05-02 13:28Brad KingFixed in Version => CMake 3.6
2016-05-02 13:28Brad KingTarget Version => CMake 3.6
2016-05-03 10:05Brad KingNote Edited: 0041011bug_revision_view_page.php?bugnote_id=41011#r2101
2016-06-10 14:21Kitware RobotNote Added: 0041178
2016-06-10 14:21Kitware RobotStatusresolved => closed

Notes
(0040947)
Brad King   
2016-04-29 13:37   
We try to work with Git versions all the way back to 1.6.5 while gracefully reducing functionality with older versions. Please check what version introduced support for the `--recursive --init` option.
(0040948)
Ilya   
2016-04-29 14:36   
Brad, according to https://git-scm.com/docs/git-submodule/1.6.5 [^] it should be supported.
(0041011)
Brad King   
2016-05-02 13:28   
(edited on: 2016-05-03 10:05)
Thanks, applied:

 ExternalProject: Initialize Git submodules recursively and on update
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=79410eeb [^]

(0041178)
Kitware Robot   
2016-06-10 14:21   
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.