[CMake] Maintainer for FindX11, FindOpenGL, and FindTCL (and friends)

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Dec 20 20:23:43 EST 2010


On 2010-12-20 18:27-0500 Clifford Yapp wrote:

> [In] the case of Tcl/Tk I would prefer to move back from the splitting up
> of Tcl/Tk functionality to just FindTCL.cmake - the primary reason for
> this is to avoid situations where there are multiple Tcl/Tk systems
> installed and the tclsh search returns a tclsh executable that is not
> the tclsh associated with the libraries of the Tcl selected by the
> find_library logic.  It might be conceivable to put some constraint
> logic in to make a find_package on one to conform to the results
> already found by another, but that seems awfully forced.  By the same
> token, there is no reason the tclsh and tclstub find files need to
> march to the same drummer as the FindTCL.cmake file, although the
> results might be somewhat surprising if they didn't.

I am interested in your post from the perspective of a long-time
Tcl and Tk find module user.

I agree that finding Tcl extensions such as Tk that are consistent
with the version of Tcl that is found is important.  We have run
across this issue with the CMake-based PLplot build system and would
welcome a solution.

I agree that the approach of using a giant Tcl + extensions find
module rather than separated find modules might be preferred because
it would keep all the version consistency enforcement logic contained
in one place, and there might be a good chance (see below) to keep the
cmake code compact by looping through the various extensions. Of
course, if you take that giant find module approach you will want to
give the user the chance to select which Tcl extensions (if any) he
wants to find, but so long as that extension selection functionality
is part of it, I can see no other objections to a giant find module
approach for Tcl and its extensions.

I would also advise writing the giant find module in a way that makes
it easy to add new find capability for extensions since such
extensions continue to be added to Tcl from time to time.  Ideally,
there would be a list of Tcl extensions and associated data that you
loop through to do all the standard find stuff for each extension so
that adding find capability of another Tcl extension would normally
require just adding another component name and associated data to the
extensions list. (I am thinking along the lines of a loop paradigm we
use a lot in the PLplot build system where the loop list consists of
elements which are themselves colon-separated to allow easy parsing of
all required data inside the loop, but you may have your own loop
paradigm you prefer to use instead.)

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list