<html><body bgcolor="#FFFFFF"><div>If anyone is interessted, I think I found a solution:</div><div><br></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">git submodule update --init --recursive</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">Instead of both lines</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">Best Regards</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><br></span>Am 27.06.2011 um 19:56 schrieb NoRulez <<a href="mailto:norulez@me.com">norulez@me.com</a>>:<br><br></div><div></div><blockquote type="cite"><div><div class="WordSection1"><p class="MsoNormal">Hi,<o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal"><span lang="EN-US">currently I use the following to update git submodules during the ctest:<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> if (EXISTS "${CTEST_SOURCE_DIRECTORY}/.gitmodules")<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> execute_process (COMMAND ${GIT_EXECUTABLE} submodule init<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY})<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> # Update the sub modules<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> execute_process (COMMAND ${GIT_EXECUTABLE} submodule update<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY})<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> endif ()<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">The problem here is that if a submodule has also submodules this doesn’t work, so I tried it with:<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> if (EXISTS "${CTEST_SOURCE_DIRECTORY}/.gitmodules")<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> execute_process (COMMAND ${GIT_EXECUTABLE} submodule init<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY})<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> # Update the sub modules<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> execute_process (COMMAND ${GIT_EXECUTABLE} submodule update <span style="background:yellow;mso-highlight:yellow">--recursive</span><o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY})<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""> endif ()<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">The main problem here is that the “submodule init” command doesn’t initialize “recursive”.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">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.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">Many thanks in advance<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">Best Regards<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">NoRulez<o:p></o:p></span></p></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Powered by <a href="http://www.kitware.com"><a href="http://www.kitware.com">www.kitware.com</a></a></span><br><span></span><br><span>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></a></span><br><span></span><br><span>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ"><a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a></a></span><br><span></span><br><span>Follow this link to subscribe/unsubscribe:</span><br><span><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></span></div></blockquote></body></html>