On 21. mars 2013 12:00, Rolf Eike Beer wrote: > Am 21.03.2013 11:03, schrieb Yngve Inntjore Levinsen: >> Hi, >> >> I have a suggestion for the PythonInterp. On a system I am compiling my >> code on, I need to find the python binary which is newer than 2.5. >> However, the default /usr/bin/python is 2.4. >> >> If I then set the variable (which is not documented in the header by the >> way) PythonInterp_FIND_VERSION to 2.5, it will first search for the >> following list of binary names: >> python2.5 python2 python. > > This looks like you are using CMake 2.8.7 or before. Upgrade. > > Eike > --
cmake --version cmake version 2.8.10.2 Have a look at line 64 and 79 of FindPythonInterp.cmake. If e.g. PythonInterp_FIND_VERSION is set to 2.5, then _Python_NAMES in line 64 is equal to "python2.5;python2;python" It then finds python2 or python. Since PYTHON_EXECUTABLE then is found in line 79, it does not check the other versions (2.6 and 2.7). Or? Cheers, Yngve -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake