Commit 8e77fc8b authored by Florent Pruvost's avatar Florent Pruvost

add the detection of libgfortran in FindBLAS

parent c49413fd
......@@ -458,12 +458,37 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
if (UNIX AND NOT WIN32)
# m
find_library(M_LIBRARY NAMES m)
find_library(M_LIBRARY
NAMES m
HINTS ${_libdir})
if(M_LIBRARY)
set(LM "-lm")
else()
set(LM "")
endif()
# Fortran
set(LGFORTRAN "")
if (CMAKE_C_COMPILER_ID MATCHES "GNU")
find_library(
FORTRAN_gfortran_LIBRARY
NAMES gfortran
HINTS ${_libdir}
)
mark_as_advanced(FORTRAN_gfortran_LIBRARY)
if (FORTRAN_gfortran_LIBRARY)
set(LGFORTRAN "${FORTRAN_gfortran_LIBRARY}")
endif()
elseif (CMAKE_C_COMPILER_ID MATCHES "Intel")
find_library(
FORTRAN_ifcore_LIBRARY
NAMES ifcore
HINTS ${_lib_env}
)
mark_as_advanced(FORTRAN_ifcore_LIBRARY)
if (FORTRAN_ifcore_LIBRARY)
set(LGFORTRAN "{FORTRAN_ifcore_LIBRARY}")
endif()
endif()
set(BLAS_COMPILER_FLAGS "")
if (NOT BLA_VENDOR STREQUAL "Intel10_64lp_seq")
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
......@@ -1044,7 +1069,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
sgemm
""
"${SEARCH_LIB}"
""
"${LGFORTRAN}"
)
endif()
endforeach ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment