mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-15 19:50:31 -06:00
FindBLAS/LAPACK: Add libblastrampoline support
libblastrampoline is a BLAS/LAPACK demuxing layer to allow selecting a BLAS/LAPACK library at runtime. Fixes: #25913
This commit is contained in:
5
Help/release/dev/FindBLAS-LAPACK-libblastrampoline.rst
Normal file
5
Help/release/dev/FindBLAS-LAPACK-libblastrampoline.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
FindBLAS-LAPACK-libblastrampoline
|
||||
---------------------------------
|
||||
|
||||
* The :module:`FindBLAS` and :module:`FindLAPACK` modules gained
|
||||
support for ``libblastrampoline``.
|
||||
@@ -164,6 +164,11 @@ BLAS/LAPACK Vendors
|
||||
|
||||
Intel MKL v10+ 64 bit, single dynamic library
|
||||
|
||||
``libblastrampoline``
|
||||
.. versionadded:: 3.30
|
||||
|
||||
A BLAS/LAPACK demuxing library using PLT trampolines
|
||||
|
||||
``NVHPC``
|
||||
.. versionadded:: 3.21
|
||||
|
||||
@@ -1352,6 +1357,31 @@ if(BLA_VENDOR STREQUAL "NVHPC" OR BLA_VENDOR STREQUAL "All")
|
||||
unset(_blas_nvhpc_lib)
|
||||
endif()
|
||||
|
||||
# libblastrampoline? (https://github.com/JuliaLinearAlgebra/libblastrampoline/tree/main)
|
||||
if(BLA_VENDOR STREQUAL "libblastrampoline" OR BLA_VENDOR STREQUAL "All")
|
||||
set(_blas_libblastrampoline_lib "blastrampoline")
|
||||
|
||||
if(WIN32)
|
||||
# Windows appends the version number to the library
|
||||
string(APPEND _blas_libblastrampoline_lib "-5")
|
||||
endif()
|
||||
|
||||
if(NOT BLAS_LIBRARIES)
|
||||
check_blas_libraries(
|
||||
BLAS_LIBRARIES
|
||||
BLAS
|
||||
sgemm
|
||||
""
|
||||
"${_blas_libblastrampoline_lib}"
|
||||
""
|
||||
""
|
||||
""
|
||||
)
|
||||
endif()
|
||||
|
||||
unset(_blas_libblastrampoline_lib)
|
||||
endif()
|
||||
|
||||
# Generic BLAS library?
|
||||
if(BLA_VENDOR STREQUAL "Generic" OR
|
||||
BLA_VENDOR STREQUAL "All")
|
||||
|
||||
@@ -742,6 +742,14 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE)
|
||||
unset(_lapack_nvhpc_flags)
|
||||
endif()
|
||||
|
||||
# libblastrampoline? (https://github.com/JuliaLinearAlgebra/libblastrampoline/tree/main)
|
||||
if(NOT LAPACK_LIBRARIES
|
||||
AND (BLA_VENDOR STREQUAL "libblastrampoline" OR BLA_VENDOR STREQUAL "All"))
|
||||
if(BLAS_LIBRARIES MATCHES "blastrampoline.+")
|
||||
set(LAPACK_LIBRARIES ${BLAS_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Generic LAPACK library?
|
||||
if(NOT LAPACK_LIBRARIES
|
||||
AND (BLA_VENDOR STREQUAL "Generic"
|
||||
|
||||
Reference in New Issue
Block a user