I would strongly encourage you to allow the download to occur at build time
using ExternalProject_Add. There's no need to make the configure step of
CMake wait for a download.

There is no way to execute the custom command steps of an ExternalProject at
cmake configure time...

If you really want to do it, though, just use "execute_process" and give it
the command that you want to run to clone or pull from the git repo.

"execute_process" calls, when used in a CMakeLists.txt file, run while CMake
is configuring the build tree.


HTH,
David


On Thu, Apr 28, 2011 at 12:53 PM, Jan Wurster <jan.wurs...@icido.de> wrote:

>  Dear list,
>
>  as I'm encountering a case where I'd like to trigger the download of a
> file (3rd party) structure from a git repository I've been looking into
> ExternalProject_add and its benefits. However the key element would be
> to perform the download step immediately, i.e. at cmake first run time
> in the configure step of the wrapping project.
>
>  Is it possible to trigger individual steps to be done 'now' instead of
> during build time or should I look at implementing a custom script for
> this case?
>
>  Thanks in advance, cheers,
> Jan
>
>
> _______________________________________________
> 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
>
_______________________________________________
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