MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0015864 | CMake | (No Category) | public | 2015-11-26 11:46 | 2016-05-02 08:30 |
|
Reporter | Arthur Klassen | |
Assigned To | David Cole | |
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | closed | Resolution | no change required | |
Platform | x86_64 | OS | Windows | OS Version | 7 |
Product Version | CMake 3.1.3 | |
Target Version | | Fixed in Version | | |
|
Summary | 0015864: 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. |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-11-26 11:46 | Arthur Klassen | New Issue | |
2015-11-26 17:43 | David Cole | Note Added: 0039913 | |
2015-11-26 17:45 | David Cole | Note Added: 0039914 | |
2015-11-26 17:45 | David Cole | Status | new => resolved |
2015-11-26 17:45 | David Cole | Resolution | open => no change required |
2015-11-26 17:45 | David Cole | Assigned To | => David Cole |
2015-11-26 18:28 | Arthur Klassen | Note Added: 0039915 | |
2015-11-26 20:41 | David Cole | Note Added: 0039916 | |
2016-05-02 08:30 | Robert Maynard | Note Added: 0040970 | |
2016-05-02 08:30 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0039913)
|
David Cole
|
2015-11-26 17:43
|
|
This is not a CMake problem. There are practically NO windows programs that could run something via PATH in this scenario inside a directory where there are double quotes in the value of PATH... The problem is the double quotes. They are not necessary, and in fact hinder proper searching, even for the Windows cmd prompt.
I will close this as "not a CMake bug" -- the problem is your PATH setting. Remove the double quotes, and it will work fine. |
|
|
(0039914)
|
David Cole
|
2015-11-26 17:45
|
|
|
|
(0039915)
|
Arthur Klassen
|
2015-11-26 18:28
|
|
cmd.exe was happy as a clam either way, so your second sentence is just not true, at least not in the Wonderful Warped World of Windows; but I can live with the status quo. Thanks for taking a look or two at it. cheers...ank |
|
|
(0039916)
|
David Cole
|
2015-11-26 20:41
|
|
I will concede it's possible it may work somewhere, on some versions of Windows, but I certainly don't think it's true on all versions... I would accept "partially true" as a judgment on my second sentence, but not "untrue."
;-)
Happy Thanksgiving! |
|
|
(0040970)
|
Robert Maynard
|
2016-05-02 08:30
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|