[CMake] ctest & git submodules

Clinton Stimpson clinton at elemtech.com
Tue Feb 26 14:36:38 EST 2013


Thanks.  I may have to do that for now.

However, it seems to me that ctest already does a 
git submodule update --recurse
but its missing the --init flag to deal with changes to the .gitmodules file.

Clint

On Tuesday, February 26, 2013 08:26:21 PM NoRulez wrote:
> Here is a working example:
> 
> ## -- Update git submodules
> if (EXISTS "${CTEST_SOURCE_DIRECTORY}/.gitmodules")
> message (" -- Update git submodules ${MODEL} - ${CTEST_BUILD_NAME} --")
> execute_process (COMMAND ${GIT_EXECUTABLE} submodule update --init
> --recursive WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY})
> endif ()
> 
> Best Regards
> 
> Am 26.02.2013 um 20:16 schrieb NoRulez <norulez at me.com>:
> > Hi,
> > 
> > I don't think so, you could check for a .git directory and then call
> > 
> > git submodule update --init --recursive
> > 
> > Best Regards
> > 
> > Am 26.02.2013 um 18:34 schrieb Clinton Stimpson <clinton at elemtech.com>:
> >> Is there anything special I need to do with ctest so that the
> >> ctest_update() will recognize git submodules and do any init/update of
> >> those for me?  I assumed it would be automatic, but that doesn't seem to
> >> be the case.> 
> > --
> > 
> > Powered by www.kitware.com
> > 
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> > 
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> > 
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com


More information about the CMake mailing list