[cmake-developers] Git for windows patch

Brad King brad.king at kitware.com
Fri Jan 15 10:25:55 EST 2016


On 01/14/2016 06:48 PM, Shawn Waldon wrote:
> patch that tells CMake to look in the default install location for
> Git for Windows [2] when asked for git.

This is expected to work already as follows.  This code:

 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Platform/WindowsPaths.cmake;hb=v3.4.1#l25

adds the program files directories to CMAKE_SYSTEM_PREFIX_PATH. Then
the find_program call in FindGit:

 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindGit.cmake;hb=v3.4.1#l54

uses the PATH_SUFFIXES options "Git/cmd" and "Git/bin" to look in
the relevant install directories.

You'll have to investigate locally to determine why this method is
not working.

-Brad


More information about the cmake-developers mailing list