MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0013818 | CMake | Modules | public | 2012-12-28 15:04 | 2016-06-10 14:31 |
| Reporter | Reid Kleckner | ||||
| Assigned To | Kitware Robot | ||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | moved | ||
| Platform | Cygwin | OS | Windows | OS Version | 7 |
| Product Version | CMake 2.8.10.2 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0013818: FindPythonInterp finds a cygwin symlink which can't be used with execute_process | ||||
| Description | I'm using native Windows CMake from a Cygwin shell, so Cygwin Python is on my PATH. My /usr/bin looks like: $ ll /usr/bin/python* lrwxrwxrwx 1 rnk Domain Users 13 Aug 20 18:35 /usr/bin/python -> python2.6.exe -rwxr-xr-x 1 rnk Domain Users 4622 Jun 9 2012 /usr/bin/python2.6.exe -rwxr-xr-x 1 rnk Domain Users 1419 Jun 9 2012 /usr/bin/python2.6-config lrwxrwxrwx 1 rnk Domain Users 16 Aug 20 18:35 /usr/bin/python-config -> python2.6-config FindPythonInterp.cmake uses find_program() with "python" first, which succeeds. This is a reasonable result to return, but then execute_process fails on the Cygwin symlink file. It doesn't seem reasonable for native Windows CMake to know how to follow Cygwin symlinks, so maybe find_program should fail on such symlinks, or FindPythonInterp should test that it can actually execute the python executable, and fall back to its version based queries. As a workaround, it's pretty easy for me to point it at the right executable. | ||||
| Steps To Reproduce | Install or build native Windows CMake In a Cygwin shell, run cmake on this script: include(FindPythonInterp) if( NOT PYTHONINTERP_FOUND ) message(FATAL_ERROR "can't find python") endif () execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "print \"hello\"" RESULT_VARIABLE result) if (NOT "${result}" STREQUAL "0") message(FATAL_ERROR "PYTHON_EXECUTABLE failed, is it a symlink?") endif () | ||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2012-12-28 15:04 | Reid Kleckner | New Issue | |||
| 2016-06-10 14:28 | Kitware Robot | Note Added: 0042186 | |||
| 2016-06-10 14:28 | Kitware Robot | Status | new => resolved | ||
| 2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | ||
| 2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | ||
| 2016-06-10 14:31 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||