Commit 55b11aee authored by Praetorius, Simon's avatar Praetorius, Simon

umfpack cmake configuration adopted to taurus system

parent ea84748d
......@@ -26,38 +26,49 @@ macro(target_enable_umfpack _TARGET_ _SCOPE_)
else (SuiteSparse_FOUND)
# find umfpack manually by searching for umfpack.h header file
find_library(UMFPACK_LIBRARY umfpack
HINTS ${AMDIS_UMFPACK_LIB_DIR}
HINTS ${AMDIS_UMFPACK_LIB_DIR} ${SUITESPARSE_LIB} $ENV{SUITESPARSE_LIB}
DOC "Library file for UMFPACK")
find_file(UMFPACK_H umfpack.h
HINTS ${AMDIS_UMFPACK_INCLUDE_DIR} ENV CPATH /usr/include /usr/include/suitesparse /usr/include/ufsparse
HINTS ${AMDIS_UMFPACK_INCLUDE_DIR} ${SUITESPARSE_INC} $ENV{SUITESPARSE_INC} ENV CPATH /usr/include /usr/include/suitesparse /usr/include/ufsparse
DOC "Headerfile umfpack.h for UMFPACK")
if (UMFPACK_H AND UMFPACK_LIBRARY)
get_filename_component(UMFPACK_PATH ${UMFPACK_H} PATH)
target_include_directories(${_TARGET_} ${_SCOPE_} ${UMFPACK_PATH})
get_filename_component(UMFPACK_LIB_PATH ${UMFPACK_LIBRARY} PATH)
set(FOUND_SUITESPARSE_LIBS ${UMFPACK_LIBRARY})
# find all connected libraries
find_library(AMD_LIBRARY amd HINTS ${UMFPACK_LIB_PATH})
find_library(BLAS_LIBRARY NAMES blas openblas HINTS ${UMFPACK_LIB_PATH} /usr/lib /usr/lib/openblas-base)
find_library(CHOLMOD_LIBRARY cholmod HINTS ${UMFPACK_LIB_PATH})
find_library(COLAMD_LIBRARY colamd HINTS ${UMFPACK_LIB_PATH})
find_library(SUITESPARSECONFIG_LIBRARY suitesparseconfig HINTS ${UMFPACK_LIB_PATH})
if (AMD_LIBRARY AND BLAS_LIBRARY)
list(APPEND FOUND_SUITESPARSE_LIBS ${AMD_LIBRARY} ${BLAS_LIBRARY})
endif (AMD_LIBRARY AND BLAS_LIBRARY)
if (CHOLMOD_LIBRARY)
list(APPEND FOUND_SUITESPARSE_LIBS ${CHOLMOD_LIBRARY})
endif (CHOLMOD_LIBRARY)
if (COLAMD_LIBRARY)
list(APPEND FOUND_SUITESPARSE_LIBS ${COLAMD_LIBRARY})
endif (COLAMD_LIBRARY)
if (SUITESPARSECONFIG_LIBRARY)
list(APPEND FOUND_SUITESPARSE_LIBS ${SUITESPARSECONFIG_LIBRARY})
endif (SUITESPARSECONFIG_LIBRARY)
target_include_directories(${_TARGET_} ${_SCOPE_} ${UMFPACK_PATH})
if (LINK_EXECUTABLE)
# find all connected libraries
find_library(AMD_LIBRARY amd HINTS ${UMFPACK_LIB_PATH})
find_library(BLAS_LIB
NAMES blas fblas openblas
HINTS ${BLAS_DIR}/lib ${UMFPACK_LIB_PATH} /usr/lib/openblas-base /usr/lib/atlas-base)
if (BLAS_LIB)
set(BLAS_LIBRARIES ${BLAS_LIB})
else (BLAS_LIB)
find_package(BLAS REQUIRED)
endif (BLAS_LIB)
find_library(CHOLMOD_LIBRARY cholmod HINTS ${UMFPACK_LIB_PATH})
find_library(COLAMD_LIBRARY colamd HINTS ${UMFPACK_LIB_PATH})
find_library(SUITESPARSECONFIG_LIBRARY suitesparseconfig HINTS ${UMFPACK_LIB_PATH})
if (AMD_LIBRARY AND BLAS_LIBRARIES)
list(APPEND FOUND_SUITESPARSE_LIBS ${AMD_LIBRARY} ${BLAS_LIBRARIES})
endif (AMD_LIBRARY AND BLAS_LIBRARIES)
if (CHOLMOD_LIBRARY)
list(APPEND FOUND_SUITESPARSE_LIBS ${CHOLMOD_LIBRARY})
endif (CHOLMOD_LIBRARY)
if (COLAMD_LIBRARY)
list(APPEND FOUND_SUITESPARSE_LIBS ${COLAMD_LIBRARY})
endif (COLAMD_LIBRARY)
if (SUITESPARSECONFIG_LIBRARY)
list(APPEND FOUND_SUITESPARSE_LIBS ${SUITESPARSECONFIG_LIBRARY})
endif (SUITESPARSECONFIG_LIBRARY)
target_link_libraries(${_TARGET_} ${_SCOPE_} ${FOUND_SUITESPARSE_LIBS})
endif (LINK_EXECUTABLE)
else()
......
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