[CMake] CMake 2.8.3-rc4 ready for testing!

Michael Hertling mhertling at online.de
Tue Nov 2 01:26:43 EDT 2010


On 11/01/2010 01:22 AM, Marcus D. Hanwell wrote:
> On Sun, Oct 31, 2010 at 7:30 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
>> Hi I saw in the log you added a case for Python 2.7,
>> Would you be able to add a check for Python 3.x ?
>>
>> For Blender 3D we use CMake and only support python 3.x series.
> 
> I added that (or part of it at least). I suspect it is too late, and
> we really need to add a variable to request Python 3. That would be
> too big of a change this late in the RC series. We could work on
> something, with a view to getting it in CMake 2.8.4, that you could
> add to Blender's CMake module path until the release.
> 
> I think for it to be general enough we would need something that
> defaulted to Python 2.x, but could look for Python 3 if the project
> requested it. I was not sure how best to handle this, and wanted to
> make sure this release found Python 2.7. I know for most of the
> project I develop we explicitly don't want Python 3 as our stuff is
> not ready for it yet.

Perhaps, the version parameter of FIND_PACKAGE() can be used for this
purpose. Due to the prevalence of Python 2, one could agree on 2.x as
the default if no version is specified whereas 3.x may be explicitly
requested as FIND_PACKAGE(Python{Interp,Libs} 3 ...). IMO, this is a
more straight approach than introducing additional variables for the
version selection and should mean no harm to backward compatibility.

Regards,

Michael


More information about the CMake mailing list