[CMake] CMake finds the wrong Python interpreter on Windows

Noel O'Boyle baoilleach at gmail.com
Thu Feb 25 11:49:37 EST 2010


On 25 February 2010 16:18, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> Noel O'Boyle wrote:
>
>>
>> Good question. It works:
>> -- Found PythonInterp: C:/Python26/python.exe
>> -- Found PythonLibs: C:/Python26/libs/python26.lib
>>
>> However, if I set the PATH to C:\Python26;C:\Cygwin\bin, the original
>> problem reappears. (It's also there if I have
>> PATH=C:\Cygwin\bin;C:\Python26.)
>>
> Strange.
>
> I can not see why it would prefer c:\Cygwin\bin over c:\Python26...
>
> Can you build CMake from source on this machine?
>
> If so, can you add some print statements here:
> Source/kwsys/SystemTools.cxx
>
> kwsys_stl::string SystemTools::FindProgram(
> ...
>
> Just add std::cout << tryPath.c_str() just before each call to
> SystemTools::FileExists in that function.

Done. I've attached the result (off list). In summary it seems to be
searching for python2.6.exe first, instead of python.exe.

> -Bill
>


More information about the CMake mailing list