Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7dd3cfe5 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

LIBRARY_DIRS may be found with pkg-config now

parent f0165e88
No related branches found
No related tags found
No related merge requests found
...@@ -305,29 +305,30 @@ if(BLAS_SEQ_LIBRARIES) ...@@ -305,29 +305,30 @@ if(BLAS_SEQ_LIBRARIES)
set(BLAS_LINKER_FLAGS "${BLAS_SEQ_LINKER_FLAGS}") set(BLAS_LINKER_FLAGS "${BLAS_SEQ_LINKER_FLAGS}")
endif() endif()
# extract libs paths # extract libs paths if not given by find_package(BLAS)
# remark: because it is not given by find_package(BLAS) if (NOT BLAS_LIBRARY_DIRS)
set(BLAS_LIBRARY_DIRS "") set(BLAS_LIBRARY_DIRS "")
string(REPLACE " " ";" BLAS_LIBRARIES "${BLAS_LIBRARIES}") string(REPLACE " " ";" BLAS_LIBRARIES "${BLAS_LIBRARIES}")
foreach(blas_lib ${BLAS_LIBRARIES}) foreach(blas_lib ${BLAS_LIBRARIES})
if (EXISTS "${blas_lib}")
get_filename_component(a_blas_lib_dir "${blas_lib}" PATH)
list(APPEND BLAS_LIBRARY_DIRS "${a_blas_lib_dir}" )
else()
string(REPLACE "-L" "" blas_lib "${blas_lib}")
if (EXISTS "${blas_lib}") if (EXISTS "${blas_lib}")
list(APPEND BLAS_LIBRARY_DIRS "${blas_lib}" )
else()
get_filename_component(a_blas_lib_dir "${blas_lib}" PATH) 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}" )
list(APPEND BLAS_LIBRARY_DIRS "${a_blas_lib_dir}" ) else()
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() endif()
endif() endif()
endif() endforeach()
endforeach() if (BLAS_LIBRARY_DIRS)
if (BLAS_LIBRARY_DIRS) list(REMOVE_DUPLICATES BLAS_LIBRARY_DIRS)
list(REMOVE_DUPLICATES BLAS_LIBRARY_DIRS) endif ()
endif () endif(NOT BLAS_LIBRARY_DIRS)
# check that BLASEXT has been found # check that BLASEXT has been found
# --------------------------------- # ---------------------------------
......
...@@ -245,29 +245,30 @@ if (LAPACK_SEQ_LIBRARIES) ...@@ -245,29 +245,30 @@ if (LAPACK_SEQ_LIBRARIES)
set(LAPACK_LIBRARIES "${LAPACK_SEQ_LIBRARIES}") set(LAPACK_LIBRARIES "${LAPACK_SEQ_LIBRARIES}")
endif() endif()
# extract libs paths # extract libs paths if not given by find_package(LAPACK)
# remark: because it is not given by find_package(LAPACK) if (NOT LAPACK_LIBRARY_DIRS)
set(LAPACK_LIBRARY_DIRS "") set(LAPACK_LIBRARY_DIRS "")
string(REPLACE " " ";" LAPACK_LIBRARIES "${LAPACK_LIBRARIES}") string(REPLACE " " ";" LAPACK_LIBRARIES "${LAPACK_LIBRARIES}")
foreach(lapack_lib ${LAPACK_LIBRARIES}) foreach(lapack_lib ${LAPACK_LIBRARIES})
if (EXISTS "${lapack_lib}")
get_filename_component(a_lapack_lib_dir "${lapack_lib}" PATH)
list(APPEND LAPACK_LIBRARY_DIRS "${a_lapack_lib_dir}" )
else()
string(REPLACE "-L" "" lapack_lib "${lapack_lib}")
if (EXISTS "${lapack_lib}") if (EXISTS "${lapack_lib}")
list(APPEND LAPACK_LIBRARY_DIRS "${lapack_lib}" )
else()
get_filename_component(a_lapack_lib_dir "${lapack_lib}" PATH) 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}" )
list(APPEND LAPACK_LIBRARY_DIRS "${a_lapack_lib_dir}" ) else()
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() endif()
endif() endif()
endif() endforeach()
endforeach() if (LAPACK_LIBRARY_DIRS)
if (LAPACK_LIBRARY_DIRS) list(REMOVE_DUPLICATES LAPACK_LIBRARY_DIRS)
list(REMOVE_DUPLICATES LAPACK_LIBRARY_DIRS) endif ()
endif () endif (NOT LAPACK_LIBRARY_DIRS)
# check that LAPACKEXT has been found # check that LAPACKEXT has been found
# ----------------------------------- # -----------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment