diff options
Diffstat (limited to 'Modules/FindBLAS.cmake')
-rw-r--r-- | Modules/FindBLAS.cmake | 72 |
1 files changed, 67 insertions, 5 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index e4353df..01d0236 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -53,18 +53,46 @@ The following variables may be set to influence this module's behavior: * ``Arm_mp`` * ``Arm_ilp64`` * ``Arm_ilp64_mp`` + * ``EML`` + * ``EML_mt`` * ``Generic`` + .. versionadded:: 3.6 + ``OpenBLAS`` support. + + .. versionadded:: 3.11 + ``FLAME`` support. + + .. versionadded:: 3.13 + Added ILP64 MKL variants (``Intel10_64ilp``, ``Intel10_64ilp_seq``). + + .. versionadded:: 3.17 + Added single dynamic library MKL variant (``Intel10_64_dyn``). + + .. versionadded:: 3.18 + Arm Performance Libraries support (``Arm``, ``Arm_mp``, ``Arm_ilp64``, + ``Arm_ilp64_mp``). + + .. versionadded:: 3.19 + ``FlexiBLAS`` support. + + .. versionadded:: 3.20 + Elbrus Math Library support (``EML``, ``EML_mt``). + ``BLA_F95`` if ``ON`` tries to find the BLAS95 interfaces ``BLA_PREFER_PKGCONFIG`` + .. versionadded:: 3.11 + if set ``pkg-config`` will be used to search for a BLAS library first and if one is found that is preferred Imported targets ^^^^^^^^^^^^^^^^ +.. versionadded:: 3.18 + This module defines the following :prop_tgt:`IMPORTED` target: ``BLAS::BLAS`` @@ -104,10 +132,13 @@ This module defines the following variables: Hints ^^^^^ -Set the ``MKLROOT`` environment variable to a directory that contains an MKL -installation, or add the directory to the dynamic library loader environment -variable for your platform (``LIB``, ``DYLD_LIBRARY_PATH`` or -``LD_LIBRARY_PATH``). +``MKLROOT`` + .. versionadded:: 3.15 + + Set this environment variable to a directory that contains an MKL + installation, or add the directory to the dynamic library loader environment + variable for your platform (``LIB``, ``DYLD_LIBRARY_PATH`` or + ``LD_LIBRARY_PATH``). #]=======================================================================] @@ -586,16 +617,22 @@ if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") else() find_package(Threads REQUIRED) endif() + set(_threadlibs "${CMAKE_THREAD_LIBS_INIT}") + if(BLA_STATIC) + find_package(OpenMP COMPONENTS C) + list(PREPEND _threadlibs "${OpenMP_C_LIBRARIES}") + endif() check_blas_libraries( BLAS_LIBRARIES BLAS sgemm "" "openblas" - "${CMAKE_THREAD_LIBS_INIT}" + "${_threadlibs}" "" "" ) + unset(_threadlibs) endif() endif() @@ -951,6 +988,31 @@ if(BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") endif() endif() +# Elbrus Math Library? +if(BLA_VENDOR MATCHES "EML" OR BLA_VENDOR STREQUAL "All") + + set(BLAS_EML_LIB "eml") + + # Check for OpenMP support, VIA BLA_VENDOR of eml_mt + if(BLA_VENDOR MATCHES "_mt") + set(BLAS_EML_LIB "${BLAS_EML_LIB}_mt") + endif() + + if(NOT BLAS_LIBRARIES) + check_blas_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "${BLAS_EML_LIB}" + "" + "" + "" + ) + endif() + +endif() + # Generic BLAS library? if(BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") if(NOT BLAS_LIBRARIES) |