FindLAPACK: Test for implicitly linked LAPACK libraries
While FindBLAS tests for a BLAS implementation implicitly linked by the compiler, FindLAPACK was not doing that, even though BLAS and LAPACK are very often provided by the same means. So, for example, while
find_package(BLAS)
worked well with Cray Compiler Environment and resulted in
BLAS_FOUND=TRUE
and empty BLAS_LIBRARIES
,
find_package(LAPACK)
was failing with the same setup. This commit makes FindLAPACK behave the same as FindBLAS in this regard.
The implementation of this feature is the same as in the case of FindBLAS: If empty LAPACK_LIBRARIES
provides the tested function (cheev
), then it is set to "LAPACK_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES", which allows it to skip further tests and be cleared at the end of the script.
Also added a missing guard preventing testing Intel MKL when LAPACK_LIBRARIES
is already set. (All other sections have such a guard.)