diff options
Diffstat (limited to 'Modules/FindLAPACK.cmake')
-rw-r--r-- | Modules/FindLAPACK.cmake | 91 |
1 files changed, 25 insertions, 66 deletions
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index bb49039..b8a3363 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -8,11 +8,11 @@ FindLAPACK Find Linear Algebra PACKage (LAPACK) library This module finds an installed Fortran library that implements the -LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). +`LAPACK linear-algebra interface`_. -The approach follows that taken for the ``autoconf`` macro file, -``acx_lapack.m4`` (distributed at -http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html). +At least one of the ``C``, ``CXX``, or ``Fortran`` languages must be enabled. + +.. _`LAPACK linear-algebra interface`: http://www.netlib.org/lapack/ Input Variables ^^^^^^^^^^^^^^^ @@ -23,58 +23,8 @@ The following variables may be set to influence this module's behavior: if ``ON`` use static linkage ``BLA_VENDOR`` - If set, checks only the specified vendor, if not set checks all the - possibilities. List of vendors valid in this module: - - * ``FlexiBLAS`` - * ``OpenBLAS`` - * ``FLAME`` - * ``Intel10_32`` (intel mkl v10 32 bit, threaded code) - * ``Intel10_64lp`` (intel mkl v10+ 64 bit, threaded code, lp64 model) - * ``Intel10_64lp_seq`` (intel mkl v10+ 64 bit, sequential code, lp64 model) - * ``Intel10_64ilp`` (intel mkl v10+ 64 bit, threaded code, ilp64 model) - * ``Intel10_64ilp_seq`` (intel mkl v10+ 64 bit, sequential code, ilp64 model) - * ``Intel10_64_dyn`` (intel mkl v10+ 64 bit, single dynamic library) - * ``Intel`` (obsolete versions of mkl 32 and 64 bit) - * ``ACML`` - * ``Apple`` - * ``NAS`` - * ``Arm`` - * ``Arm_mp`` - * ``Arm_ilp64`` - * ``Arm_ilp64_mp`` - * ``EML`` - * ``EML_mt`` - * ``Fujitsu_SSL2`` (Fujitsu serial blas / lapack) - * ``Fujitsu_SSL2BLAMP`` (Fujitsu parallel blas / lapack) - * ``NVHPC`` - * ``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``). - Fujitsu SSL2 Library support (``Fujitsu_SSL2``, ``Fujitsu_SSL2BLAMP``) - - .. versionadded:: 3.21 - NVHPC support + Set to one of the :ref:`BLAS/LAPACK Vendors` to search for BLAS only + from the specified vendor. If not set, all vendors are considered. ``BLA_F95`` if ``ON`` tries to find the BLAS95/LAPACK95 interfaces @@ -88,11 +38,11 @@ The following variables may be set to influence this module's behavior: Imported targets ^^^^^^^^^^^^^^^^ -.. versionadded:: 3.18 - -This module defines the following :prop_tgt:`IMPORTED` target: +This module defines the following :prop_tgt:`IMPORTED` targets: ``LAPACK::LAPACK`` + .. versionadded:: 3.18 + The libraries to use for LAPACK, if found. Result Variables @@ -113,19 +63,28 @@ This module defines the following variables: ``LAPACK95_FOUND`` library implementing the LAPACK95 interface is found -.. note:: +Intel MKL +^^^^^^^^^ + +To use the Intel MKL implementation of LAPACK, a project must enable at least +one of the ``C`` or ``CXX`` languages. Set ``BLA_VENDOR`` to an Intel MKL +variant either on the command-line as ``-DBLA_VENDOR=Intel10_64lp`` or in +project code: - C, CXX or Fortran must be enabled to detect a BLAS/LAPACK library. - C or CXX must be enabled to use Intel Math Kernel Library (MKL). +.. code-block:: cmake - For example, to use Intel MKL libraries and/or Intel compiler: + set(BLA_VENDOR Intel10_64lp) + find_package(LAPACK) - .. code-block:: cmake +In order to build a project using Intel MKL, and end user must first +establish an Intel MKL environment. See the :module:`FindBLAS` module +section on :ref:`Intel MKL` for details. - set(BLA_VENDOR Intel10_64lp) - find_package(LAPACK) #]=======================================================================] +# The approach follows that of the ``autoconf`` macro file, ``acx_lapack.m4`` +# (distributed at http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html). + if(CMAKE_Fortran_COMPILER_LOADED) include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake) else() |