The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15864 ====================================================================== Reported By: Arthur Klassen Assigned To: ====================================================================== Project: CMake Issue ID: 15864 Category: (No Category) Reproducibility: sometimes Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-11-26 11:46 EST Last Modified: 2015-11-26 11:46 EST ====================================================================== Summary: CMake can't always find git.exe in PATH element with quotation marks Description: My 581-character path includes things in c:\Program Files, some but not all in quotation marks. The element of the USER variable of PATH pointing to git.exe had quotation marks around it and sometimes that prevented cmake from finding it. Removing the quotation marks solved the problem. Their presence does not invalidate the path as far as cmd.exe is concerned: it found git.exe just fine either way, so this is an issue, if a minor one, easily worked around.
For a "simple" CMakeLists.txt file this problem never occurred!!? Steps to Reproduce: When my PATH variable contained: set PATH=C:\Perl64\site\bin;C:\Perl64\bin;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Common Files\ThinPrint\;C:\Program Files\TortoiseGit\bin;e:\me\tools;"c:\Program Files\Git\cmd\";%APPDATA%\Python\Scripts;C:\Program Files (x86)\CMake\bin A three-line CMakeLists.txt file like this: cmake_minimum_required( VERSION 3.1 ) find_package( Git ) message( "Returned value of GIT_EXECUTABLE is ${GIT_EXECUTABLE}" ) was able to find Git but calling find_package( Git ) from a more complex CMakeLists.txt (that includes other sub-CMakeLists files) failed, even from the first line of the most top-level CMakeLists.txt file, even when the "message()" call was followed by a "return()". This persisted until I removed the quotation marks from the path. This occurred even if I moved the "git" path to the front of the PATH variable. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-11-26 11:46 Arthur Klassen New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers