it is now up to user of these Find* module to find and link to BLAS and/or LAPACK

This commit is contained in:
Gael Guennebaud 2011-02-18 11:23:27 +01:00
parent 3345ea0ddd
commit d8ca948148
3 changed files with 44 additions and 57 deletions

View File

@ -1,3 +1,5 @@
# Cholmod lib usually requires linking to a blas and lapack library.
# It is up to the user of this module to find a BLAS and link to it.
if (CHOLMOD_INCLUDES AND CHOLMOD_LIBRARIES)
set(CHOLMOD_FIND_QUIETLY TRUE)

View File

@ -1,30 +1,23 @@
# Umfpack lib usually requires linking to a blas library.
# It is up to the user of this module to find a BLAS and link to it.
if (SUPERLU_INCLUDES AND SUPERLU_LIBRARIES)
set(SUPERLU_FIND_QUIETLY TRUE)
endif (SUPERLU_INCLUDES AND SUPERLU_LIBRARIES)
find_package(BLAS)
find_path(SUPERLU_INCLUDES
NAMES
supermatrix.h
PATHS
$ENV{SUPERLUDIR}
${INCLUDE_INSTALL_DIR}
PATH_SUFFIXES
superlu
)
if(BLAS_FOUND)
find_library(SUPERLU_LIBRARIES superlu PATHS $ENV{SUPERLUDIR} ${LIB_INSTALL_DIR})
find_path(SUPERLU_INCLUDES
NAMES
supermatrix.h
PATHS
$ENV{SUPERLUDIR}
${INCLUDE_INSTALL_DIR}
PATH_SUFFIXES
superlu
)
find_library(SUPERLU_LIBRARIES superlu PATHS $ENV{SUPERLUDIR} ${LIB_INSTALL_DIR})
if(SUPERLU_LIBRARIES)
set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES})
endif(SUPERLU_LIBRARIES)
endif(BLAS_FOUND)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SUPERLU DEFAULT_MSG
SUPERLU_INCLUDES SUPERLU_LIBRARIES)

View File

@ -1,53 +1,45 @@
# Umfpack lib usually requires linking to a blas library.
# It is up to the user of this module to find a BLAS and link to it.
if (UMFPACK_INCLUDES AND UMFPACK_LIBRARIES)
set(UMFPACK_FIND_QUIETLY TRUE)
endif (UMFPACK_INCLUDES AND UMFPACK_LIBRARIES)
find_package(BLAS)
find_path(UMFPACK_INCLUDES
NAMES
umfpack.h
PATHS
$ENV{UMFPACKDIR}
${INCLUDE_INSTALL_DIR}
PATH_SUFFIXES
suitesparse
)
if(BLAS_FOUND)
find_library(UMFPACK_LIBRARIES umfpack PATHS $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
find_path(UMFPACK_INCLUDES
NAMES
umfpack.h
PATHS
$ENV{UMFPACKDIR}
${INCLUDE_INSTALL_DIR}
PATH_SUFFIXES
suitesparse
)
if(UMFPACK_LIBRARIES)
find_library(UMFPACK_LIBRARIES umfpack PATHS $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
get_filename_component(UMFPACK_LIBDIR ${UMFPACK_LIBRARIES} PATH)
if(UMFPACK_LIBRARIES)
find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
if (AMD_LIBRARY)
set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${AMD_LIBRARY})
#else (AMD_LIBRARY)
# set(UMFPACK_LIBRARIES FALSE)
endif (AMD_LIBRARY)
get_filename_component(UMFPACK_LIBDIR ${UMFPACK_LIBRARIES} PATH)
endif(UMFPACK_LIBRARIES)
find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
if (AMD_LIBRARY)
set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${AMD_LIBRARY})
#else (AMD_LIBRARY)
# set(UMFPACK_LIBRARIES FALSE)
endif (AMD_LIBRARY)
if(UMFPACK_LIBRARIES)
endif(UMFPACK_LIBRARIES)
find_library(COLAMD_LIBRARY colamd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
if (COLAMD_LIBRARY)
set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${COLAMD_LIBRARY})
#else (COLAMD_LIBRARY)
# set(UMFPACK_LIBRARIES FALSE)
endif (COLAMD_LIBRARY)
if(UMFPACK_LIBRARIES)
find_library(COLAMD_LIBRARY colamd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
if (COLAMD_LIBRARY)
set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${COLAMD_LIBRARY})
#else (COLAMD_LIBRARY)
# set(UMFPACK_LIBRARIES FALSE)
endif (COLAMD_LIBRARY)
endif(UMFPACK_LIBRARIES)
if(UMFPACK_LIBRARIES)
set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${BLAS_LIBRARIES})
endif(UMFPACK_LIBRARIES)
endif(BLAS_FOUND)
endif(UMFPACK_LIBRARIES)
include(FindPackageHandleStandardArgs)