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

2010-12-20 Thread Clifford Yapp
Looking at http://www.cmake.org/Wiki/CMake:Module_Maintainers (thanks
Brad for the link) it looks like my best option may be to actually
volunteer for the maintainership of FindX11, FindOpenGL and
FindTCL(sh/stubs/etc...), as they are not listed as being actively
maintained.

Since I need these modules in any case and would have to keep them
working for my own purposes, this would seem to be a workable
solution.  I had hesitated to propose this step because I had figured
Kitware would prefer to itself maintain the Find modules for such
central functionality, but if they are indeed on the list of modules
for whom a maintainer candidate is sought I'm willing to give it a go.

FindX11.cmake and FindOpenGL.cmake are fairly straightforward, but 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.

Tcl/Tk appears to have been a significant focus of the original
developers.  I'm leery about becoming maintainer and making such
radical changes to something the Kitware devs probably need without
approval, so I'd like to discuss it here (unless it's just flat out
unworkable, of course ;-)

Cheers,
CY
___
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://www.cmake.org/mailman/listinfo/cmake


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

2010-12-20 Thread Alan W. Irwin

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
__
___
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://www.cmake.org/mailman/listinfo/cmake


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

2010-12-20 Thread Clifford Yapp
On Mon, Dec 20, 2010 at 8:23 PM, Alan W. Irwin
ir...@beluga.phys.uvic.ca wrote:

 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.

So far I have been using a combination of sanity checks on found
results and parsing of the sh config files in the Tcl/Tk
installations, which I understand are intended to supply critical
information to the TEA build system.  Fortunately, they are simple
enough that with the help of a clever break-up-into-lines approach
CMake's regex abilities can make sense of the key entries.

 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.

We might want to distinguish between extensions like Itcl/Itk and
core features like threading support or Aqua vs. X11 windowing
system.  Generally speaking, I've been including in my local
FindTCL.cmake one option per item for things that are a basic for
rejecting a Tcl/Tk installation outright (no threads, Tk is Aqua when
I need X11, version of Tcl is too old, etc.)

For packages that can (in principle) be compiled as additions to an
installed Tcl/Tk (tkhtml, tktable, etc.) I've written a routine that
generates a tcl script designed to capture the version of a package
installed and output it to a file.  For any packages of interest, I
first find my Tcl installation and then run the FIND_TCL_PACKAGE macro
for whatever packages I desire.  Admittedly this is of little use if
you want to use this as a basis to outright reject a Tcl installation,
but it should be possible to integrate your suggestion of supplying a
list of requirements over which to iterate.  I hadn't considered this
because our approach is to build a local copy of the extension if we
can't find it, but that's not always a workable/good approach.

A concern there might be how to handle version number requirements for
the list of packages - it would be fairly simple to specify a list of
packages to check for but supplying candidate version numbers gets a
bit harder - maybe package;version and use a regex to check for the
presence of a ; before processing?

 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.)

I think we're thinking along similar lines.  I need to rework my file
a bit anyway to make sure I'm conforming as much as possible to the
readme guidelines, so I'll think about how to add the
package/extension checking mechanism in at the same time.  (Always
granting that this is of interest to The Powers That Be ;-)

If you are interested, I can send you a version of my FindTCL.cmake
once I get done reworking it to see if it would meet your needs.

Cheers,
CY

P.S. - thank you and the PLplot project for your excellent CMake
scripts - they have been a help to me on several occasions puzzling
out some of the finer points of CMake.
___
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://www.cmake.org/mailman/listinfo/cmake


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

2010-12-20 Thread Alan W. Irwin

On 2010-12-20 21:08-0500 Clifford Yapp wrote:


If you are interested, I can send you a version of my FindTCL.cmake
once I get done reworking it to see if it would meet your needs.


Sure.  I would be glad to help test your work for our particular
Tcl/Tk/itcl/itk needs.

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
__
___
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://www.cmake.org/mailman/listinfo/cmake