From 6ce94ae0b740c65604194bf93d799184f869a80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=B6hler?= Date: Mon, 13 Nov 2023 11:26:49 +0100 Subject: Find{BLAS,LAPACK}: Fix OpenBLAS ILP64 support with MSYS2 packages Typically, ILP64 BLAS libraries are suffixed with `64`, but the MSYS2 package provides the ILP64 version of OpenBLAS with a `_64` suffix. --- Modules/FindBLAS.cmake | 6 +++++- Modules/FindLAPACK.cmake | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 39a1163..e9b118f 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -746,7 +746,11 @@ if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") set(_blas_openblas_lib "openblas") if(_blas_sizeof_integer EQUAL 8) - string(APPEND _blas_openblas_lib "64") + if(MINGW) + string(APPEND _blas_openblas_lib "_64") + else() + string(APPEND _blas_openblas_lib "64") + endif() endif() if(NOT BLAS_LIBRARIES) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 4d3ab5a..e142516 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -487,7 +487,11 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) set(_lapack_openblas_lib "openblas") if(_lapack_sizeof_integer EQUAL 8) - string(APPEND _lapack_openblas_lib "64") + if(MINGW) + string(APPEND _lapack_openblas_lib "_64") + else() + string(APPEND _lapack_openblas_lib "64") + endif() endif() check_lapack_libraries( -- cgit v0.12