[CMake] FindGit.cmake on Windows
David Cole
david.cole at kitware.com
Thu Sep 16 18:16:50 EDT 2010
I wanted to try to sneak this into CMake 2.8.3, but I'm not convinced it's
the right fix.
$ENV{ProgramFiles} is "C:\Program Files (x86)" from 32-bit CMake run on
Win64, but it's "C:\Program Files" from 64-bit CMake run on Win64... So to
find "git.exe" we'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
http://public.kitware.com/Bug/view.php?id=9992 )
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...
In the meantime, you can (and should) specify GIT_EXECUTABLE in your cache
if CMake has trouble finding it on its own.
Cheers,
David
On Tue, Aug 31, 2010 at 12:01 PM, Dixon, Shane <Shane.Dixon at atmel.com>wrote:
> 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:
>
>
>
> From:
>
> find_program(GIT_EXECUTABLE
>
> NAMES ${git_names}
>
> DOC "git command line client"
>
> )
>
>
>
> To:
>
> find_program(GIT_EXECUTABLE
>
> NAMES ${git_names}
>
> HINTS $ENV{ProgramFiles}/Git/bin
>
> DOC "git command line client"
>
> )
>
>
>
> This change worked for me so that the GIT_EXECUTABLE variable gets
> populated correctly when using a Visual Studio 2008 command prompt.
>
>
>
> --
>
> Shane Dixon
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100916/b9f86907/attachment.htm>
More information about the CMake
mailing list