[CMake] CTest GIT support does not properly update recursive submodules

Johan Björk phb at spotify.com
Fri Feb 18 10:00:09 EST 2011


Hi Brad,

On Mon, Feb 7, 2011 at 7:14 PM, Brad King <brad.king at kitware.com> wrote:

> Hi Johan,
>
> Let's move this over to the developers' list.  I'm cc-ing the users' list
> just for this transition message.  Thanks.
>
> On 02/05/2011 06:50 PM, Johan Björk wrote:
> > The fix is extremely simple, in cmCTestGIT.cxx:266
> > char const* git_submodule[] = {git, "submodule", "update", 0};
> > modify to
> > char const* git_submodule[] = {git, "submodule", "update",
> > "--recursive", 0};
>
> This would be a nice approach, but the --recursive option was added in
> Git 1.6.5, released 2009-10-10.  Versions older than that were still
> in common use when the submodule update code was added on 2010-05-04:
>
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67277bac
>
> and may still be.  We have a few options:
>
> (1) Hard-code --recursive and add a check to error out if the Git
> version is not new enough.
>
> (2) Test the Git version and pass --recursive only if new enough.
> This could lead to subtle behavior differences between Git versions,
> but perhaps we could print a warning.
>
> (3) Add an interface to specify options for the invocation of the
> submodule update command.
>
> Comments?
> -Brad
>
(2) seems both complicated and confusing for end users. I would vote for (1)
as if someone updates to the latest CMake on their machine, they shouldn't
have any issues in upgrading the git version in use.


/Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110218/bb378b56/attachment.htm>


More information about the CMake mailing list