2

I'm using old Cmake version(3.1) which detects OpenBLAS as Generic version in FindLAPACK.cmake

Now I can find if openBLAS is installed or not but how to detect if LAPACK returned by FindLAPACK is the OpenBLAS version.

Using regex won't work either because the LAPACK_LIBRARIES gives path such as

/usr/lib/liblapack.so but internally it points to

/usr/lib/openblas-base/liblapack.so.3

Is there any other way such as searching for a function or something else?

  • 2
    You can distribute recent `FindLAPACK.cmake` along with your source. – arrowd Dec 12 '17 at 18:12
  • 1
    Indeed, in the recent version of `FindLAPACK.cmake`, the variable `BLA_VENDOR` can be set to `OpenBLAS` to only check that vendor. https://github.com/Kitware/CMake/blob/master/Modules/FindLAPACK.cmakeThen, you can try to set `BLA_VENDOR` to `OpenBLAS`, then `find_package()` lapack, then test `LAPACK_FOUND`. If false, unset `BLA_VENDOR` and call `find_package()`, lapack, REQUIRED. – francis Dec 13 '17 at 07:19

0 Answers0