MantisBT - CMake
View Issue Details
0015758CMakeCMakepublic2015-09-25 17:382016-03-07 09:12
Kevin Wojniak 
Brad King 
normalfeaturealways
closedfixed 
Windows
CMake 3.3.2 
CMake 3.5CMake 3.5 
0015758: FindGit does not work when git is installed through SourceTree
https://www.sourcetreeapp.com [^]

SourceTree on Windows can download and setup git. When this happens it places it (at least on my system) at:

%USERPROFILE%/AppData/Local/Atlassian/SourceTree/git_local/bin/git.exe

But FindGit does not find it in this location.
1. Make sure no git version is installed in Windows
2. Install SourceTree and when prompted install git
3. In CMake - include(FindGit)
4. GIT_FOUND will be false
No tags attached.
Issue History
2015-09-25 17:38Kevin WojniakNew Issue
2015-09-28 08:55Brad KingNote Added: 0039483
2015-09-28 12:26Kevin WojniakNote Added: 0039490
2015-09-28 12:56Brad KingNote Added: 0039491
2015-10-12 15:07Kevin WojniakNote Added: 0039578
2015-10-12 15:26Brad KingNote Added: 0039579
2015-10-12 15:26Brad KingAssigned To => Brad King
2015-10-12 15:26Brad KingStatusnew => resolved
2015-10-12 15:26Brad KingResolutionopen => fixed
2015-10-12 15:26Brad KingFixed in Version => CMake 3.5
2015-10-12 15:26Brad KingTarget Version => CMake 3.5
2016-03-07 09:12Robert MaynardNote Added: 0040613
2016-03-07 09:12Robert MaynardStatusresolved => closed

Notes
(0039483)
Brad King   
2015-09-28 08:55   
Is there a Windows Registry entry associated with this installation?
(0039490)
Kevin Wojniak   
2015-09-28 12:26   
What kind of entry? I didn't see anything under Software/Atlassian where it would be expected. There is a file association under HKEY_CURRENT_USER/Software/Classes/sourcetree.
(0039491)
Brad King   
2015-09-28 12:56   
Here is a change made for a similar case:

 FindGit: Search in 'GitHub for Windows' user directory
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54690624 [^]

Try making a similar change to your FindGit.cmake to glob the SourceTree location.
(0039578)
Kevin Wojniak   
2015-10-12 15:07   
Here's my pull request: https://github.com/Kitware/CMake/pull/194 [^]
(0039579)
Brad King   
2015-10-12 15:26   
Thanks, applied with minor tweaks:

 FindGit: Search in 'Atlassian SourceTree' user directory
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57f701a7 [^]
(0040613)
Robert Maynard   
2016-03-07 09:12   
Closing resolved issues that have not been updated in more than 4 months.