[CMake] FindLAPACK/FindBLAS require Fortran compiler. Why?

Marcel Loose loose at astron.nl
Tue Jul 7 05:08:32 EDT 2009


Hi Michael,

I'm not surprised that it's quite difficult to make checks for
Lapack/Blas work cross-platform and cross-vendor.

But the essence of my question was: why do I need a Fortran compiler!?

As you wrote in your answer: That's probably because these modules ONLY
search for the Fortran interfaces. Now, that's exactly what they should
do: search for interfaces! Interfaces: that's libraries in the case of
Fortran. No compiler is required IMHO, cause I'm only linking against
(Fortran) libraries.

Best regards,
Marcel Loose.


On Tue, 2009-07-07 at 10:32 +0200, Michael Wild wrote:
> On 7. Jul, 2009, at 10:11, Marcel Loose wrote:
> 
> > Hi all,
> >
> > I noticed that FindLAPACK and FindBLAS require that you enable Fortran
> > as language, which causes CMake to check for a working Fortran
> > compiler.
> > IMHO, you only need the fortran runtime libraries, cause you're only
> > linking against the Lapack/Blas libraries. Most Linux distro's have
> > separate packages for compiler and runtime libraries.
> >
> > Is there a good reason for FindLAPACK and FindBLAS to require a  
> > working
> > Fortran compiler?
> >
> > Best regards,
> > Marcel Loose.
> >
> 
> That's probably because these modules ONLY search for the Fortran  
> interfaces. Usually one needs a different set of libraries for cblas  
> and clapack. Also the function names to check for are different (e.g.  
> cblas_dgemm versus dgemm).
> 
> Perhaps someone finds the time to write FindCBLAS.cmake and  
> FindCLAPACK.cmake... But honestly, if you look at FindBLAS.cmake, that  
> is quite tough as the various vendor implementations differ strongly  
> in library names, required compiler flags etc. Linking against Intel  
> MKL is just a night-mare!
> 
> I hope this explains it a bit (although the answer is probably not  
> very satisfying).
> 
> Michael
> 



More information about the CMake mailing list