[CMake] CMake finds the wrong Python interpreter on Windows

Bill Hoffman bill.hoffman at kitware.com
Thu Feb 25 11:18:57 EST 2010


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.

-Bill


More information about the CMake mailing list