[CMake] Python version specification in FindPythonInterp is ignored

Ateljevich, Eli eli at water.ca.gov
Tue Jun 26 12:04:13 EDT 2012


Hi Andreas,
Thanks. This must be what is happening. The references I saw to CMAKE_PREFIX_PATH suggested it was environment-only and needs to be known "at cmake time". That didn't fit my needs well and even though it seemed funny I never challenged that.

You are suggesting it can be set in cmake which I'll try. It would solve my issues, though my experience with customizing of this type is it needs to be done at the right moment in the cmake process which isn't always clear. Is there going to be a lot of extra stuff on CMAKE_PREFIX_PATH and I need to be appending?

Thanks!
Eli

________________________________
From: Andreas Pakulat [apaku at gmx.de]
Sent: Monday, June 25, 2012 2:35 PM
To: Ateljevich, Eli
Cc: cmake at cmake.org
Subject: Re: [CMake] Python version specification in FindPythonInterp is ignored

Hi,

On Mon, Jun 25, 2012 at 11:20 PM, Ateljevich, Eli <eli at water.ca.gov<mailto:eli at water.ca.gov>> wrote:
Actually, clearing the cache worked for FindPythonInterp but I still can’t get FindPythonLibs.cmake to work. Same problem …. it can find the 2.4 version but not the 2.7 version – and gives an error when 2.7 is required. Obviously, I cleared the cache this time. Again, is there a hint I can give to help it find the version I want?

Well, that depends on how the module actually finds stuff - unless it documents the ways in its 'header section' (which is also available in the cmake manual usually). Usually it would use find_path/find_library and may find_file, which all understand CMAKE_PREFIX_PATH as either cmake or environment variable and append the necessary include/lib etc. suffix.

Andreas


More information about the CMake mailing list