summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-06-21 14:44:07 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-06-21 14:44:14 (GMT)
commitb27c3700e6d602f0c658ce78709b725a244297e0 (patch)
tree3f224af2ce65fbf0414ccc9a51fbd2caf8661f5d
parent45778c4f499c9d8f220a62a0a78c599cad8bfaf1 (diff)
parent70f15d202f1bfed7a08a36a5977cc94a1a829e2f (diff)
downloadCMake-b27c3700e6d602f0c658ce78709b725a244297e0.zip
CMake-b27c3700e6d602f0c658ce78709b725a244297e0.tar.gz
CMake-b27c3700e6d602f0c658ce78709b725a244297e0.tar.bz2
Merge topic 'drhpc-findblas-pkgconfig'
70f15d202f Modules/Find{BLAS,LAPACK}: allow choice of pkg-config package Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7370
-rw-r--r--Modules/FindBLAS.cmake11
-rw-r--r--Modules/FindLAPACK.cmake12
2 files changed, 21 insertions, 2 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 7a381af..d02c589 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -35,6 +35,12 @@ The following variables may be set to influence this module's behavior:
if set ``pkg-config`` will be used to search for a BLAS library first
and if one is found that is preferred
+``BLA_PKGCONFIG_BLAS``
+ .. versionadded:: 3.25
+
+ If set, the ``pkg-config`` method will look for this module name instead of
+ just ``blas``.
+
``BLA_SIZEOF_INTEGER``
.. versionadded:: 3.22
@@ -273,8 +279,11 @@ endif()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
if(BLA_PREFER_PKGCONFIG)
+ if(NOT BLA_PKGCONFIG_BLAS)
+ set(BLA_PKGCONFIG_BLAS "blas")
+ endif()
find_package(PkgConfig QUIET)
- pkg_check_modules(PKGC_BLAS QUIET blas)
+ pkg_check_modules(PKGC_BLAS QUIET ${BLA_PKGCONFIG_BLAS})
if(PKGC_BLAS_FOUND)
set(BLAS_FOUND ${PKGC_BLAS_FOUND})
set(BLAS_LIBRARIES "${PKGC_BLAS_LINK_LIBRARIES}")
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 50d4ebd..699ab7e 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -35,6 +35,13 @@ The following variables may be set to influence this module's behavior:
if set ``pkg-config`` will be used to search for a LAPACK library first
and if one is found that is preferred
+``BLA_PKGCONFIG_LAPACK``
+ .. versionadded:: 3.25
+
+ If set, the ``pkg-config`` method will look for this module name instead of
+ just ``lapack``.
+
+
``BLA_SIZEOF_INTEGER``
.. versionadded:: 3.22
@@ -278,8 +285,11 @@ endif()
# Search with pkg-config if specified
if(BLA_PREFER_PKGCONFIG)
+ if(NOT BLA_PKGCONFIG_LAPACK)
+ set(BLA_PKGCONFIG_LAPACK "lapack")
+ endif()
find_package(PkgConfig QUIET)
- pkg_check_modules(PKGC_LAPACK QUIET lapack)
+ pkg_check_modules(PKGC_LAPACK QUIET ${BLA_PKGCONFIG_LAPACK})
if(PKGC_LAPACK_FOUND)
set(LAPACK_FOUND TRUE)
set(LAPACK_LIBRARIES "${PKGC_LAPACK_LINK_LIBRARIES}")