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 doesn’t
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 doesn’t
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

_______________________________________________
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

Reply via email to