Commit 218e681c authored by PRUVOST Florent's avatar PRUVOST Florent

Morse Finds update

parent 27f9a090
This diff is collapsed.
......@@ -291,13 +291,18 @@ endif()
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}" )
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()
endforeach()
......
......@@ -124,6 +124,7 @@ if (BLAS_FOUND)
# this can be the case with libs such as MKL, ACML
include(CheckFunctionExists)
set(CMAKE_REQUIRED_LIBRARIES "${BLAS_LINKER_FLAGS};${BLAS_LIBRARIES}")
set(CMAKE_REQUIRED_FLAGS "${BLAS_COMPILER_FLAGS}")
unset(CBLAS_WORKS CACHE)
check_function_exists(cblas_dscal CBLAS_WORKS)
mark_as_advanced(CBLAS_WORKS)
......
......@@ -248,13 +248,18 @@ endif()
set(LAPACK_LIBRARY_DIRS "")
string(REPLACE " " ";" LAPACK_LIBRARIES "${LAPACK_LIBRARIES}")
foreach(lapack_lib ${LAPACK_LIBRARIES})
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}" )
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()
endforeach()
......@@ -262,7 +267,6 @@ if (LAPACK_LIBRARY_DIRS)
list(REMOVE_DUPLICATES LAPACK_LIBRARY_DIRS)
endif ()
# check that LAPACK has been found
# ---------------------------------
include(FindPackageHandleStandardArgs)
......
......@@ -230,6 +230,7 @@ foreach(ptscotch_lib ${PTSCOTCH_libs_to_find})
mark_as_advanced(PTSCOTCH_${ptscotch_lib}_LIBRARY)
endforeach()
list(REMOVE_DUPLICATES PTSCOTCH_LIBRARY_DIRS)
# check a function to validate the find
if(PTSCOTCH_LIBRARIES)
......
......@@ -213,6 +213,7 @@ foreach(scotch_lib ${SCOTCH_libs_to_find})
mark_as_advanced(SCOTCH_${scotch_lib}_LIBRARY)
endforeach()
list(REMOVE_DUPLICATES SCOTCH_LIBRARY_DIRS)
# check a function to validate the find
if(SCOTCH_LIBRARIES)
......
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