FindLAPACK cannot find OpenBLAS if BLA_STATIC=ON
Hello! Consider the following CMake code:
set(BLA_VENDOR OpenBLAS)
set(BLA_STATIC OFF)
find_package(LAPACK REQUIRED)
This works fine:
-- Found LAPACK: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
Change BLA_STATIC
to ON
:
set(BLA_VENDOR OpenBLAS)
set(BLA_STATIC ON)
find_package(LAPACK REQUIRED)
output:
[cmake] CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
[cmake] Could NOT find LAPACK (missing: LAPACK_LIBRARIES)
The static library for both BLAS and LAPACK is /usr/lib/x86_64-linux-gnu/libopenblas.a. If BLA_STATIC=ON
, find_package(BLAS)
finds it, and I would expect find_package(LAPACK)
to find it too, but it does not.