Feature Request: FindBLAS should report which vendor it found

It is useful to know which BLAS implementation find_package(BLAS) has found, because the user might want to make use of non-standard API.

For example, you might want to set the number of OpenMP threads used by the library, and since that isn’t standard API, each implementation has a different way of saying this.

Current workarounds for this are either:

  1. Manually do set(BLA_VENDOR "some_vendor") and call find_package(BLAS) until it succeeds.
  2. Check the cache for BLAS_<vendor_name>_LIBRARIES and find the one that was found.

But these are deficient for the following reasons:

  1. For (1) what happens when CMake adds support for another BLAS implementation? Or removes support for a particular vendor? Now my code probably doesn’t work anymore.
  2. For (1) what happens if the order in which I do my loop is not the same order as FindBlas.cmake would do? Now I would potentially find a different BLAS.
  3. For (2) it should be clear this is bad, if solely for the fact that it relies on private cache variables.

So this is something CMake should export to the user.

See CMake Issue 26724.