I wanted to try to sneak this into CMake 2.8.3, but I&#39;m not convinced it&#39;s the right fix.<div><br></div><div>$ENV{ProgramFiles} is &quot;C:\Program Files (x86)&quot; from 32-bit CMake run on Win64, but it&#39;s &quot;C:\Program Files&quot; from 64-bit CMake run on Win64... So to find &quot;git.exe&quot; we&#39;d need to try both, or determine which one is appropriate to use, similar to the fix that I did put in for issue #9992 ( see <a href="http://public.kitware.com/Bug/view.php?id=9992">http://public.kitware.com/Bug/view.php?id=9992</a> )<br>
<br></div><div>I think a sweep through many of the find_program calls is probably in order to resolve issues like this. I do not have the time in the next couple of weeks to come up with a general solution, but it would be nice if we could try to get one figured out before the 2.8.4 release a few months down the road...</div>
<div><br></div><div>In the meantime, you can (and should) specify GIT_EXECUTABLE in your cache if CMake has trouble finding it on its own.</div><div><br></div><div><br></div><div>Cheers,</div><div>David</div><div><br><div class="gmail_quote">
<br></div><div class="gmail_quote">On Tue, Aug 31, 2010 at 12:01 PM, Dixon, Shane <span dir="ltr">&lt;<a href="mailto:Shane.Dixon@atmel.com">Shane.Dixon@atmel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">









<div lang="EN-US" link="blue" vlink="purple">

<div>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">I wasn’t sure how to create a patch using git in
Windows.  Is it possible to modify the next version of CMake to change the
FindGit.cmake:</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">From:</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">find_program(GIT_EXECUTABLE</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">  NAMES ${git_names}</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">  DOC &quot;git command line client&quot;</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">  )</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">To:</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">find_program(GIT_EXECUTABLE</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">  NAMES ${git_names}</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">  HINTS $ENV{ProgramFiles}/Git/bin</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">  DOC &quot;git command line client&quot;</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">  )</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">This change worked for me so that the GIT_EXECUTABLE
variable gets populated correctly when using a Visual Studio 2008 command
prompt.</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">--</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Shane Dixon</span></font></p>

</div>

</div>


<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></blockquote></div><br></div>