[CMake] Git Doesn't to Pull with ExternalProject_Add

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Thu Nov 14 09:17:22 EST 2013


Hello Constantine,

On 14/11/13 12:03, Constantine Zakkaroff wrote:
> Now, setting ${proj}_GIT_TAG to "origin/master" seems to improve things. 
> I got this output:

If you plan to use the external project repository for development, then
being in detached state is not good. Also every time that the update
step is executed I believe that CMake will checkout the latest
origin/master that you fetched, not the current one, because the fetch
step is executed only if necessary (i.e. if the name origin/master was
not found). And I believe that your current commit(s) will be just
dropped in favour of the hash of origin/master (they will still be in
your repository and in your reflog, but as "dangling commits" and
therefore might be deleted.
And basically the pull is not executed.

Perhaps we need a "GIT_BRANCH" arguments to handle this in a different
way compared to "GIT_TAG", what do you think?


Also note that there is another important bug that makes developing in
git clones handled by ExternalProject complicate, see

  http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/7840

I have a partial patch for that but I couldn't find the time to finish
it yet.


Cheers,
 Daniele



More information about the CMake mailing list