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

2010-02-05 Thread Brad King
Theodore Papadopoulo wrote: > I'm attaching (for comments) a modified FortranCInterface.cmake that > basically has two modes. If a fortran and > a C compiler are available, it works as it does currently except for teo > things: > - Error messages when C or Fortran compiler is missing should be much

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

2010-02-05 Thread Theodore Papadopoulo
I have been following this discussion silently, as the problem of interfacing C/C++ with blas and lapack (and without obliging users to install a fortran compiler) is recurrent in a few of the projects I'm involved in. I'm attaching (for comments) a modified FortranCInterface.cmake that basica

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

2010-01-22 Thread Alan W. Irwin
On 2010-01-22 21:48+0100 Jed Brown wrote: On Fri, 22 Jan 2010 15:43:42 -0500, Bill Hoffman wrote: It should just work as the clapack has the correct package export stuff in its cmake files. Cool, but I don't see the point. Well, I am glad Bill pointed at that possibility since this gives

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

2010-01-22 Thread Jed Brown
On Fri, 22 Jan 2010 15:43:42 -0500, Bill Hoffman wrote: > It should just work as the clapack has the correct package export stuff > in its cmake files. Cool, but I don't see the point. Most people want to link to the vendor's implementation so they still need a robust Find* module. Jed __

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

2010-01-22 Thread Bill Hoffman
Alan W. Irwin wrote: 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 _

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

2010-01-22 Thread Alan W. Irwin
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 st

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

2010-01-22 Thread Jed Brown
On Fri, 22 Jan 2010 10:30:28 +0100, Michael Wild wrote: > This is already in CMake: FortranCInterface.cmake Sort of, this requires Fortran to be enabled. This thread started with the desire to use BLAS/Lapack *without* enabling Fortran. Jed ___ Powere

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

2010-01-22 Thread Michael Wild
On 22. Jan, 2010, at 10:21 , Arjen Markus wrote: > Hi Jed, > > yes, I'd say so. I have seen, I think, three or four different schemes > over the years, so that is fairly manageable. > > Regards, > > Arjen > > On 2010-01-22 10:15, Jed Brown wrote: >> On Fri, 22 Jan 2010 10:05:19 +0100, Arjen M

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

2010-01-22 Thread Arjen Markus
Hi Jed, yes, I'd say so. I have seen, I think, three or four different schemes over the years, so that is fairly manageable. Regards, Arjen On 2010-01-22 10:15, Jed Brown wrote: On Fri, 22 Jan 2010 10:05:19 +0100, Arjen Markus wrote: This would indeed not work on systems that do not provid

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

2010-01-22 Thread Jed Brown
On Fri, 22 Jan 2010 10:05:19 +0100, Arjen Markus wrote: > This would indeed not work on systems that do not provide an nm-like > utility, but there is an system-independent way to do this: Seems like this falls under "testing a number of common choices". The code to iterate through the choices

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

2010-01-22 Thread Arjen Markus
On 2010-01-21 18:27, Mark Moll wrote: On Jan 21, 2010, at 10:22 AM, Jed Brown wrote: On Thu, 21 Jan 2010 09:17:22 -0600, Mark Moll wrote: You *can* use the Fortran BLAS/LAPACK libraries with C/C++ code. Yes, this is actually very common, but check_fortran_function_exists works by trying to l

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

2010-01-21 Thread Jed Brown
On Thu, 21 Jan 2010 11:27:19 -0600, Mark Moll wrote: > Wouldn’t it be possible to use “nm” to detect the Fortran name mangling? For > example: Sure, provided you have nm. Jed ___ Powered by www.kitware.com Visit other Kitware open-source projects at

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

2010-01-21 Thread Mark Moll
On Jan 21, 2010, at 10:22 AM, Jed Brown wrote: > On Thu, 21 Jan 2010 09:17:22 -0600, Mark Moll wrote: >> You *can* use the Fortran BLAS/LAPACK libraries with C/C++ code. > > Yes, this is actually very common, but check_fortran_function_exists > works by trying to link an actual Fortran program.

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

2010-01-21 Thread Jed Brown
On Thu, 21 Jan 2010 09:17:22 -0600, Mark Moll wrote: > You *can* use the Fortran BLAS/LAPACK libraries with C/C++ code. Yes, this is actually very common, but check_fortran_function_exists works by trying to link an actual Fortran program. When calling from C, you have to know how Fortran names

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

2010-01-21 Thread Mark Moll
On Jan 20, 2010, at 10:53 PM, Alan W. Irwin wrote: > On 2010-01-21 11:03+0900 Ryo IGARASHI wrote: > >> Dear developers, >> >> Currently, FindLAPACK.cmake and FindBLAS.cmake *requires* Fortran compiler. >> However, I can easily think of a situation when no Fortran compiler >> but LAPACK/BLAS >>

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

2010-01-20 Thread Alan W. Irwin
On 2010-01-21 11:03+0900 Ryo IGARASHI wrote: Dear developers, Currently, FindLAPACK.cmake and FindBLAS.cmake *requires* Fortran compiler. However, I can easily think of a situation when no Fortran compiler but LAPACK/BLAS available. Let's say: * Use ATLAS on VC9 (Windows) * Buy Intel C++ compil

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

2010-01-20 Thread Ryo IGARASHI
Dear developers, Currently, FindLAPACK.cmake and FindBLAS.cmake *requires* Fortran compiler. However, I can easily think of a situation when no Fortran compiler but LAPACK/BLAS available. Let's say: * Use ATLAS on VC9 (Windows) * Buy Intel C++ compiler but not Fortran compiler (each of them have M