Brad King wrote: > On 1/17/2012 3:52 PM, Rolf Eike Beer wrote: > > Brad King wrote: > >> Can this use the version argument to find_package? If a project's > >> python code works only with 2 or only with 3 why bother even looking > >> for other versions? > > > > No, it can not. This argument gives either a minimum version, or an > > exact > > version. This way it is impossible to specify that any 2.x version would > > match. > > Actually the find_package command documents that argument as > > "The [version] argument requests a version with which the > package found should be compatible" > > so it is looking for compatible versions, not greater versions. > The meaning of "compatible" is package-specific. That's why each > Find module needs to do its own test, or in Config mode it checks > for the FooConfigVersion.cmake file and uses that to do the test. > > Therefore I would expect > > find_package(PythonInterp 2) > > to find a python interpreter compatible with version 2, which does > not include version 3. You just can't use the normal version > check from the standard find helper module.
Ok, built it that way. > > It would be enough for 3.x versions, but for that this module has to > > be > > > > fixed to actually find 3.x versions at all. > > Shouldn't that be part of this fix? It is. I've pushed an implementation to topic "python-version" on stage. If noone objects I'll merge it to next at the end of the week. Eike --
signature.asc
Description: This is a digitally signed message part.
-- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers