Commit 1912729f authored by PRUVOST Florent's avatar PRUVOST Florent

cmake Finds: improve the way library dirs are added in blas/lapack, remove...

cmake Finds: improve the way library dirs are added in blas/lapack, remove blas lib to search in essl
parent 622a0e43
......@@ -906,7 +906,7 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
BLAS
sgemm
""
"essl;blas"
"essl"
""
)
endif()
......
......@@ -259,9 +259,17 @@ endif()
# extract libs paths
# remark: because it is not given by find_package(BLAS)
set(BLAS_LIBRARY_DIRS "")
string(REPLACE " " ";" BLAS_LIBRARIES "${BLAS_LIBRARIES}")
foreach(blas_lib ${BLAS_LIBRARIES})
string(REPLACE "-L" "" blas_lib "${blas_lib}")
if (EXISTS "${blas_lib}")
list(APPEND BLAS_LIBRARY_DIRS "${blas_lib}" )
else()
get_filename_component(a_blas_lib_dir "${blas_lib}" PATH)
if (EXISTS "${a_blas_lib_dir}")
list(APPEND BLAS_LIBRARY_DIRS "${a_blas_lib_dir}" )
endif()
endif()
endforeach()
if (BLAS_LIBRARY_DIRS)
list(REMOVE_DUPLICATES BLAS_LIBRARY_DIRS)
......
......@@ -154,7 +154,7 @@ macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads
# N.B. _prefix is the prefix applied to the names of all cached variables that
# are generated internally and marked advanced by this macro.
set(_libdir ${ARGN})
set(_libraries_work TRUE)
set(${LIBRARIES})
set(_combined_name)
......
......@@ -211,9 +211,17 @@ endif()
# extract libs paths
# remark: because it is not given by find_package(LAPACK)
set(LAPACK_LIBRARY_DIRS "")
foreach(lapack_lib ${LAPACK_LIBRARIES})
string(REPLACE " " ";" LAPACK_LIBRARY_DIRS "${LAPACK_LIBRARY_DIRS}")
foreach(lapack_lib ${LAPACK_LIBRARY_DIRS})
string(REPLACE "-L" "" lapack_lib "${lapack_lib}")
if (EXISTS "${lapack_lib}")
list(APPEND LAPACK_LIBRARY_DIRS "${lapack_lib}" )
else()
get_filename_component(a_lapack_lib_dir "${lapack_lib}" PATH)
if (EXISTS "${a_lapack_lib_dir}")
list(APPEND LAPACK_LIBRARY_DIRS "${a_lapack_lib_dir}" )
endif()
endif()
endforeach()
if (LAPACK_LIBRARY_DIRS)
list(REMOVE_DUPLICATES LAPACK_LIBRARY_DIRS)
......
......@@ -17,6 +17,7 @@
#
# PASTIX depends on the following libraries:
# - Threads, m, rt
# - MPI
# - HWLOC
# - BLAS
#
......
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