[CMake] problem with CMAKE_FIND_LIBRARY_SUFFIXES/FindBLAS/BLA_STATIC

Yngve Inntjore Levinsen yngve.levinsen at gmail.com
Tue Jul 5 10:25:49 EDT 2011


Dear developers,

I am having what looks like a problem with library suffixes which I am not able to figure out.

Essentially, our project has an option which when turned on adds a "-static" to the compiler flags. This then obviously need any libraries to be static if one should use them.

I then wanted to link against BLAS/LAPACK, but need to require that the suffix is e.g. .a when on a linux system. First I tried to set the "BLA_STATIC". However, it seems that even though I have a libblas.a in my /usr/lib/, it does not find it. It should be noted that libblas.a is a symbolic link to libgoto2.a which is another symbolic link to libgoto2_penrynp-r1.13.a. Unsure if this causes any problems (?).

Another user reported that instead of failing to find the libraries, it just went on using the dynamic libraries which he had on his system. Looking at how BLA_STATIC is defined, that makes sense if he didn't have the libblas.a in his system. Linking then failed obviously. 

I figured in our case it would be better to just set the CMAKE_FIND_LIBRARY_SUFFIXES ourselves, instead of using BLA_STATIC. However, I still have the problem that it does not find my libblas.a file. Anyone knows what I am doing wrong? I am using cmake version 2.8.4, and he is using Debian Sid (unsure which version of cmake, but I can check if it is important).

Cheers,
Yngve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110705/8bd401eb/attachment-0001.htm>


More information about the CMake mailing list