[CMake] cmake vs. Python 3.4

Dan Liew dan at su-root.co.uk
Fri Dec 23 17:52:56 EST 2016


On 23 Dec 2016 7:58 pm, "Lev" <leventelist at gmail.com> wrote:

Hi list,


I have this:

FIND_PACKAGE(PythonInterp)

and cmake finds this:

-- Found PythonInterp: /usr/bin/python (found version "2.7.9")

However, 3.4 is also installed. How can I specify to find 3.4?

If I say:

set(Python_ADDITIONAL_VERSIONS 3.4)
FIND_PACKAGE(PythonInterp 3 REQUIRED)

still no luck.

When you did that did you wipe the CMake cache (e.g. delete any existing
binary build directory)? In many cases where CMake is asked to find a
binary it will create a cache variable if it was found so that on
subsequent runs of CMake it doesn't have to search for it again. You may be
hitting this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161223/ced11af6/attachment-0001.html>


More information about the CMake mailing list