Hi Folks, <div><br></div><div>I also think contributing this module back to CMake would be great.</div><div><br></div><div>This has been discuss on the list [1], few things need to be fixed and as discussed documentation updated.</div>
<div><br></div><div>The module could also probably be split into: FindGit.cmake and GitInfo.cmake (or similar name)</div>
<div><br></div><div>First, we could improve the module within Slicer :) [2], then, when we are all happy with it, I believe the module could probably be contributed back to CMake [3].</div><div><br></div><div>
Hth</div><div>Jc</div><div><br></div><div>[1] <a href="http://cmake.3232098.n2.nabble.com/Addition-to-FindGit-tp6441747p6446399.html" target="_blank">http://cmake.3232098.n2.nabble.com/Addition-to-FindGit-tp6441747p6446399.html</a><br>
[2] <a href="http://www.slicer.org/slicerWiki/index.php/Documentation/4.1/Developers/Tutorials/ContributePatch" target="_blank">http://www.slicer.org/slicerWiki/index.php/Documentation/4.1/Developers/Tutorials/ContributePatch</a></div>
<div>[3] <a href="http://www.cmake.org/Wiki/CMake:Module_Maintainers" target="_blank">http://www.cmake.org/Wiki/CMake:Module_Maintainers</a></div><div><br><div class="gmail_quote">On Thu, Jul 12, 2012 at 6:52 AM, Mateusz Loskot <span dir="ltr"><<a href="mailto:mateusz@loskot.net" target="_blank">mateusz@loskot.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 12 July 2012 07:52, Rolf Eike Beer <<a href="mailto:eike@sf-mail.de" target="_blank">eike@sf-mail.de</a>> wrote:<br>
> Mateusz Loskot wrote:<br>
>> On 12 July 2012 00:24, Aashish Chaudhary <<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>> wrote:<br>
>> ><br>
</div><div><div>>> > I don't have both files in front of me. Whats the difference between<br>
>> > the one in the slicer and once in the CMake?<br>
>><br>
>> CMake's current version [1] defines:<br>
>><br>
>> # GIT_EXECUTABLE - path to git command line client<br>
>> # GIT_FOUND - true if the command line client was found<br>
>> # GIT_VERSION_STRING - the version of git found (since CMake 2.8.8)<br>
>><br>
>> Slicer's version [2] defines:<br>
>><br>
>> # The module defines the following variables:<br>
>> # GIT_EXECUTABLE - path to git command line client<br>
>> # GIT_FOUND - true if the command line client was found<br>
>> #<br>
>> # If the command line client executable is found the macro<br>
>> # GIT_WC_INFO(<dir> <var-prefix>)<br>
>> # is defined to extract information of a git working copy at<br>
>> # a given location.<br>
>> #<br>
>> # The macro defines the following variables:<br>
>> # <var-prefix>_WC_REVISION_HASH - Current SHA1 hash<br>
>> # <var-prefix>_WC_REVISION - Current SHA1 hash<br>
>> # <var-prefix>_WC_REVISION_NAME - Name associated with<br>
>> <var-prefix>_WC_REVISION_HASH<br>
>> # <var-prefix>_WC_URL - output of command `git config --get<br>
>> remote.origin.url' # <var-prefix>_WC_ROOT - Same value as working copy URL<br>
>> # <var-prefix>_WC_GITSVN - Set to false<br>
>> #<br>
>> # ... and also the following ones if it's a git-svn repository:<br>
>> # <var-prefix>_WC_GITSVN - Set to True if it is a<br>
>> # <var-prefix>_WC_INFO - output of command `git svn info'<br>
>> # <var-prefix>_WC_URL - url of the associated SVN repository<br>
>> # <var-prefix>_WC_ROOT - root url of the associated SVN repository<br>
>> # <var-prefix>_WC_REVISION - current SVN revision number<br>
>> # <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit<br>
>> # <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit<br>
>> # <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit<br>
>> # <var-prefix>_WC_LAST_CHANGED_LOG - last log of base revision<br>
><br>
> I'm not against that change, but I find the documentation a bit misleading.<br>
> When reading it my first thought was that _WC_REVISION and _WC_GITSVN are junk,<br>
> just to learn later that they have different meaning when it's a git-svn repo.<br>
<br>
</div></div>That's what documentation is for, to clarify unobvious.<br>
<div><br>
> Looking at the code I think that line 115 (which is: if(NOT<br>
> "${git_config_output}" STREQUAL "")) could be simplified to<br>
> "if(git_config_output)". The warning in line 144 looks suspicious to me, that<br>
> would e.g. trigger on a local only git repo, no? Maybe make this an<br>
> AUTHOR_WARNING?<br>
<br>
</div>Let's assume it is a requirement specific to the Slicer project.<br>
I think, the warning could be simply removed.<br>
<div><br>
> And obviously the version extraction code is missing, but this should be<br>
> trivially fixable.<br>
<br>
</div>What version you mean? Git program version?<br>
Or, the TODO comment in line 71 of the Slicer's FindGit.cmake?<br>
<br>
My main point is to get someone from CMake team to simply grab the<br>
Slicer's version<br>
and commit to CMake upstream. Can't see reasons why it couldn't be<br>
submitted really.<br>
<div><div><br>
Best regards,<br>
--<br>
Mateusz Loskot, <a href="http://mateusz.loskot.net" target="_blank">http://mateusz.loskot.net</a><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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>
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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br><br>
</div>