[CMake] Finding Python3

Michael Wild themiwi at gmail.com
Thu Jul 22 03:29:58 EDT 2010

On 22. Jul, 2010, at 9:18 , Alan W. Irwin wrote:

> On 2010-07-22 03:09+0200 Michael Hertling wrote:

>> [...] one should
>> prefer to improve the find modules and get rid of those non-equivalent
>> alternatives after the NAMES option, in particular hardcoded version
>> lists, and freshly developed modules should use FIND_PACKAGES()'s
>> version interface right from the beginning.
> This certainly sounds promising for dealing with the same-directory
> case.  However, although the version interface appears in the usual
> documentation, I cannot find a single example of a
> <config-file>Version.cmake file.  Am I missing something or is there
> no practical demonstration of the version interface for any Find
> module included with CMake?

You are mixing two things here. <config-file>Version.cmake file are only used for the config-mode of find_package and should be installed by a CMake-based project. The FindXXX.cmake modules, however, get the version information passed as predefined variables. Examples can be found in Find{Boost,CUDA,GTK2,Java,OpenSceneGraph,Qt4,Ruby,VTK}.cmake.

> Until there is a practical demonstration of the version interface it
> is hard to be sure this is the solution we should recommend for all
> find modules. Therefore, would you be willing to create a simple
> project demonstrating your idea and share it with this list?

See above. But even then, the version interface is useful to specify the minimum or exact version that are required, but one can't express the wish to find the NEWEST version, and it doesn't capture the maximum version case at all.


More information about the CMake mailing list