<div dir="ltr">Miklos,<div><br></div><div>I did a quick test and using the DOWNLOAD_COMMAND option to ExternalProject_Add works nicely:</div><div><br></div><div><div>ExternalProject_Add(sfml</div><div>  PREFIX ${sfml_PREFIX}</div><div>  DOWNLOAD_COMMAND git clone --depth 1 <a href="https://github.com/LaurentGomila/SFML.git">https://github.com/LaurentGomila/SFML.git</a></div><div>  INSTALL_DIR ${sfml_INSTALL_DIR}</div><div>  CMAKE_ARGS ${sfml_CMAKE_ARGS}</div><div>)</div></div><div><br></div><div>I could not, however, get it to work along with specifying the GIT_REPOSITORY option. I believe this is because using the DOWNLOAD_COMMAND completely overrides all other download options.</div><div><br></div><div>I think this is the best way to get what you want. I'm surprised no one else has commented since cloning a git repo with submodules needs the 'recursive' option to actually pull in the submodule code. It's a similar problem you are facing with needing to pass in extra options to the download executable.</div><div><br></div><div>-Caleb</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 25, 2015 at 9:50 AM, Miklos Espak <span dir="ltr"><<a href="mailto:m.espak@ucl.ac.uk" target="_blank">m.espak@ucl.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>is it possible to specify the --depth 1 argument in ExternalProject_Add for cloning projects from git?</div><div><br></div><div>Cheers,</div><div>Miklos</div><div><br></div></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>J. Caleb Wherry</div><i>Scientific Software Engineer</i><div><br><a href="http://www.calebwherry.com" target="_blank"></a><div><a href="http://www.calebwherry.com" target="_blank">http://www.calebwherry.com</a><br><span><span title="Call with Google Voice"><span title="Call with Google Voice">+1 (615) 708-5651</span></span></span><div><a href="mailto:calebwherry@gmail.com" target="_blank">calebwherry@gmail.com</a></div></div></div></div>
</div>