[lapack-reference] add to CMAKE_FIND_LIBRARY_SUFFIXES additional suffixes (#14816)

* [lapack-reference] add to CMAKE_FIND_LIBRARY_SUFFIXES additional suffixes with versions for make find_library to able to find libgfortran

* restore original value of CMAKE_FIND_LIBRARY_SUFFIXES
This commit is contained in:
Eli Arzhannikov 2020-11-30 20:03:40 +01:00 committed by GitHub
parent 2fbd692f56
commit f6dabc0250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -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)

View File

@ -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})