Commit 68cb9665 authored by Florent Pruvost's avatar Florent Pruvost

separate cmake vars: 1) dir given by users and 2) the dir where the library has been actually found

parent 9a0d303a
......@@ -971,14 +971,14 @@ endif(BLA_F95)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
if (BLAS_FOUND AND NOT BLAS_DIR)
if (BLAS_FOUND)
list(GET BLAS_LIBRARIES 0 first_lib)
get_filename_component(first_lib_path "${first_lib}" PATH)
if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)")
string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}")
set(BLAS_DIR "${not_cached_dir}" CACHE PATH "Installation directory of BLAS library" FORCE)
set(BLAS_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of BLAS library" FORCE)
else()
set(BLAS_DIR "${first_lib_path}" CACHE PATH "Installation directory of BLAS library" FORCE)
set(BLAS_DIR_FOUND "${first_lib_path}" CACHE PATH "Installation directory of BLAS library" FORCE)
endif()
endif()
This diff is collapsed.
......@@ -553,13 +553,13 @@ endif(BLA_F95)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
if (LAPACK_FOUND AND NOT LAPACK_DIR)
if (LAPACK_FOUND)
list(GET LAPACK_LIBRARIES 0 first_lib)
get_filename_component(first_lib_path "${first_lib}" PATH)
if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)")
string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}")
set(LAPACK_DIR "${not_cached_dir}" CACHE PATH "Installation directory of LAPACK library" FORCE)
set(LAPACK_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of LAPACK library" FORCE)
else()
set(LAPACK_DIR "${first_lib_path}" CACHE PATH "Installation directory of LAPACK library" FORCE)
set(LAPACK_DIR_FOUND "${first_lib_path}" CACHE PATH "Installation directory of LAPACK library" FORCE)
endif()
endif()
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