[CMake] CMake finds the wrong Python interpreter on Windows

Bill Hoffman bill.hoffman at kitware.com
Fri Feb 26 10:15:06 EST 2010


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.

-Bill


More information about the CMake mailing list