[CMake] CTest and Git submodules
NoRulez
norulez at me.com
Mon Jun 27 13:56:37 EDT 2011
Hi,
currently I use the following to update git submodules during the ctest:
if (EXISTS "${CTEST_SOURCE_DIRECTORY}/.gitmodules")
execute_process (COMMAND ${GIT_EXECUTABLE} submodule init
WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY})
# Update the sub modules
execute_process (COMMAND ${GIT_EXECUTABLE} submodule update
WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY})
endif ()
The problem here is that if a submodule has also submodules this doesnt
work, so I tried it with:
if (EXISTS "${CTEST_SOURCE_DIRECTORY}/.gitmodules")
execute_process (COMMAND ${GIT_EXECUTABLE} submodule init
WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY})
# Update the sub modules
execute_process (COMMAND ${GIT_EXECUTABLE} submodule update
--recursive
WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY})
endif ()
The main problem here is that the submodule init command doesnt
initialize recursive.
Now, the question I want to ask is, if there is something in CMake/CTest
which I can call or if someone has already solved this problem.
Many thanks in advance
Best Regards
NoRulez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110627/a3be233c/attachment.htm>
More information about the CMake
mailing list