[CMake] How does one find blas and lapack on OSX?
Michael Wild
themiwi at gmail.com
Mon Jul 5 15:07:24 EDT 2010
On 5. Jul, 2010, at 18:59 , John R. Cary wrote:
> On 7/5/2010 10:54 AM, James C. Sutherland wrote:
>>
>>
>> On Mon, Jul 5, 2010 at 10:44 AM, John R. Cary <cary at txcorp.com <mailto:cary at txcorp.com>> wrote:
>>
>> On 7/5/2010 9:37 AM, James C. Sutherland wrote:
>>>
>>>
>>> On Mon, Jul 5, 2010 at 9:34 AM, John Cary <cary at txcorp.com
>>> <mailto:cary at txcorp.com>> wrote:
>>>
>>> I have simply:
>>>
>>> FIND_PACKAGE(BLAS)
>>> FIND_PACKAGE(LAPACK)
>>>
>>> but cmake gives
>>>
>>> -- Looking for BLAS... - NOT found (Fortran not enabled)
>>> -- Looking for LAPACK... - NOT found (Fortran not enabled)
>>>
>>> Is this more complicated somehow?
>>>
>>>
>>> Be sure to include
>>> enable_language( Fortran )
>>> in your project.
>>>
>>> James
>>
>>
>> Thanks much. That worked.
>>
>> On another OS, I need to use clapack. Is there a way
>> to find that instead?
>>
>> Thx...John Cary
>>
>>
>> Look back in the mail list archives. There was a discussion on this a while back. If you search for CLAPACK in the archives it should come up.
>
> Thanks very much. In thinking about this, I realize that what
> I really need is to build with whatever lapack, blas was found
> by Trilinos, when I built it. Is there a standard way of doing
> this?
>
> I see that Trilinos puts some information in the installation
> directory
>
> iter.cary$ grep -i lapack TrilinosConfig.cmake
> SET(Trilinos_TPL_LIBRARIES "/usr/lib64/liblapack.so;/usr/lib64/libblas.so")
> SET(Trilinos_TPL_LIST "LAPACK;BLAS")
>
>
> Thanks...John Cary
find_package(Trilinos REQUIRED)
and then just use the Trilinos_TPL_LIBRARIES variable (and probably Trilinios_TPL_LIST).
Michael
More information about the CMake
mailing list