[CMake] CMake finds the wrong Python interpreter on Windows

Marcus D. Hanwell marcus.hanwell at kitware.com
Fri Feb 26 10:30:10 EST 2010


On Friday 26 February 2010 10:15:06 Bill Hoffman wrote:
> Mathieu Malaterre wrote:
> the windows one prefer python
> 
> >>> over any of the named version ones...
> >> 
> >> Or find both independently and compare their versions. OTOH, the problem
> >> was the library/executable mismatch, so it doesn't matter which is
> >> found as long as the library matches the executable.
> > 
> > +1
> > There is an old bug report for cmake for this. PythonLibs should be
> > derived from a python -c"..." (see bug #2257)
> 
> We should create a new module that is FindPython that finds both of them
> and makes sure they are consistent.  We have to be careful with python
> -c because it won't work with a cross compiler.   I am thinking that we
> should put python in the front of the list of names.
> 
I have been doing some work on FindPythonLibs, and after talking with Brad 
King we concluded that having a FindPython module where components could be 
requested (as in other modules such as Qt or Boost) would be a better 
solution. I have not had much time to work on this, but if the logic were all 
in one module it would certainly be easier to ensure the logic to find the 
libraries and interpreter were consistent.

Marcus


More information about the CMake mailing list