aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/lapack-reference/CONTROL2
-rw-r--r--ports/lapack-reference/FindLAPACK.cmake8
2 files changed, 9 insertions, 1 deletions
diff --git a/ports/lapack-reference/CONTROL b/ports/lapack-reference/CONTROL
index 9ed60cc58..701e48b7d 100644
--- a/ports/lapack-reference/CONTROL
+++ b/ports/lapack-reference/CONTROL
@@ -1,6 +1,6 @@
Source: lapack-reference
Version: 3.8.0
-Port-Version: 3
+Port-Version: 4
Description: LAPACK — Linear Algebra PACKage http://www.netlib.org/lapack/
Default-Features: blas-select
Build-Depends: vcpkg-gfortran (windows)
diff --git a/ports/lapack-reference/FindLAPACK.cmake b/ports/lapack-reference/FindLAPACK.cmake
index a411c7c18..f4d25477d 100644
--- a/ports/lapack-reference/FindLAPACK.cmake
+++ b/ports/lapack-reference/FindLAPACK.cmake
@@ -110,6 +110,12 @@ set(CMAKE_REQUIRED_QUIET ${LAPACK_FIND_QUIETLY})
set(LAPACK_FOUND FALSE)
set(LAPACK95_FOUND FALSE)
+# store original values for CMAKE_FIND_LIBRARY_SUFFIXES
+set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.3gfs .so.3 .so.4 .so.5)
+endif()
+
# TODO: move this stuff to a separate module
macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _addlibdir _subdirs _blas)
@@ -549,3 +555,5 @@ if(NOT TARGET LAPACK::LAPACK)
endif()
cmake_pop_check_state()
+# restore original values for CMAKE_FIND_LIBRARY_SUFFIXES
+set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})