[CMake] Please support FindLAPACK/FindBLAS for C/C++-only projects

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Jan 22 12:57:44 EST 2010


On 2010-01-22 10:21+0100 Arjen Markus wrote:

> Hi Jed,
>
> yes, I'd say so [iterate through the common name-mangling schemes]. I have seen, I think, three or four different schemes
> over the years, so that is fairly manageable.

I agree.  So from the overview perspective, this is where I think we stand
for finding and testing lapack and blas.

(1) There should be some common functionality used by both the overall
Fortran and overall C versions for finding but not testing Fortran versions
of lapack and blas.

(2) The overall Fortran version (FindLAPACK.cmake and FindBLAS.cmake) would
use (1) and also test it to achieve the Fortran find functionality we have
now.  This is the part that would need a Fortran compiler.

(3) The overall C version (FindCLAPACK.cmake and FindCBLAS.cmake or whatever
independent names are chosen) would optionally use (1) to find Fortran
versions of lapack and blas, and test them by iterating over known
name-mangling schemes in the lapack/blas world.  There should also be an
independent option for finding pure C versions of lapack and blas and
testing those.

Alin, from your perspective as the maintainer for FindLAPACK.cmake and
FindBLAS.cmake, would it be straightforward to separate your work into (1)
and (2) while providing identical overall FindLAPACK.cmake and
FindBLAS.cmake functionality? That effort should clear the way for someone
else to implement (3) for the C find of lapack and blas and allow them to
use the common fortran find functionality in (1) without demanding they have
access to a Fortran compiler.  To my mind this reorganization is a better
approach than using something like a NOTEST switch in the current
functionality since that has the potential to screw up some Fortran users
who will inevitably try that NOTEST feature even though it is only meant
for C users.

The subject of a C version of FindLAPACK.cmake and FindBLAS.cmake has been
brought up a number of times by disgruntled CMake users who need C access to
the (often Fortran) lapack and blas libraries that are available on their
systems. Thus, there is strong motivation for _one of those users_ to
implement a lapack and blas CMake finding and testing module for C as I
noted in my first post for this thread.  However, they probably need some
help and guidance with this effort.  To my mind, (3) is a good way to do
this without them having to "re-invent the wheel" for the fortran find
effort and without adding or changing features for the fortran version.

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