Commit a8235011 authored by Radu Popescu's avatar Radu Popescu Committed by Antonio Cervone
Browse files

New support for TPL SuperLUMT

Added CMake find script. Library is optional, must be specified
when it has been activated as a Trilinos dependency
parent 402e023c
......@@ -14,6 +14,7 @@ set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Default build type")
set (LIFE_USE_HDF5 FALSE CACHE STRING "By default, don't use HDF5")
set (LIFE_USE_QHULL FALSE CACHE STRING "By default, don't use QHULL")
set (LIFE_USE_SuperLU FALSE CACHE STRING "By default, don't use SuperLU")
set (LIFE_USE_SuperLUMT FALSE CACHE STRING "By default, don't use SuperLUMT")
set (LIFE_USE_SuperLUDist FALSE CACHE STRING "By default, don't use SuperLUDist")
set (LIFE_USE_UMFPACK FALSE CACHE STRING "By default, don't use UMFPACK")
set (LIFE_USE_MPI_WRAPPER TRUE CACHE STRING "By default, use the MPI wrappers")
......@@ -25,6 +26,7 @@ set (UMFPACK_ROOT "UMFPACK_ROOT-NOTFOUND" CACHE STRING "Location of UMFPACK")
set (HDF5_ROOT "HDF5_ROOT-NOTFOUND" CACHE STRING "Location of HDF5")
set (QHULL_ROOT "QHULL_ROOT-NOTFOUND" CACHE STRING "Location of QHULL")
set (SuperLU_ROOT "SuperLU_ROOT-NOTFOUND" CACHE STRING "Location of SuperLU")
set (SuperLUMT_ROOT "SuperLUMT_ROOT-NOTFOUND" CACHE STRING "Location of SuperLUMT")
set (SuperLUDist_ROOT "SuperLUDist_ROOT-NOTFOUND" CACHE STRING "Location of SuperLUDist")
set (BOOST_ROOT "BOOST_ROOT-NOTFOUND" CACHE STRING "Location of Boost")
......@@ -149,6 +151,16 @@ if (LIFE_USE_SuperLU)
endif()
endif(LIFE_USE_SuperLU)
# SuperLUMT (optional)
if (LIFE_USE_SuperLUMT)
find_package (SuperLUMT)
if (SuperLUMT_FOUND)
set (HAVE_SuperLUMT TRUE)
include_directories (${SuperLUMT_INCLUDE_DIRS})
set (LIBS ${LIBS} ${SuperLUMT_LIBRARIES})
endif()
endif(LIFE_USE_SuperLUMT)
# SuperLUDist (optional)
if (LIFE_USE_SuperLUDist)
find_package (SuperLUDist)
......
# Find SuperLUMT headers and library.
#
# This module defines the following uncached variables:
# SuperLUMT_FOUND, if false, do not try to use SuperLUMT.
# SuperLUMT_INCLUDE_DIRS, where to find the headers.
# SuperLUMT_LIBRARIES, the libraries to link against to use the SuperLUMT library
# SuperLUMT_LIBRARY_DIRS, the directory where the SuperLUMT library is found.
find_path(
SuperLUMT_INCLUDE_DIR
supermatrix.h
/usr/local/include
/usr/include
${SuperLUMT_ROOT}/include
)
if( SuperLUMT_INCLUDE_DIR )
find_library(
SuperLUMT_LIBRARY
NAMES superlu_mt
PATHS /usr/local/lib /usr/lib ${SuperLUMT_ROOT}/lib
)
if( SuperLUMT_LIBRARY )
set(SuperLUMT_LIBRARY_DIR "")
get_filename_component(SuperLUMT_LIBRARY_DIRS ${SuperLUMT_LIBRARY} PATH)
# Set uncached variables as per standard.
set(SuperLUMT_FOUND ON)
set(SuperLUMT_INCLUDE_DIRS ${SuperLUMT_INCLUDE_DIR})
set(SuperLUMT_LIBRARIES ${SuperLUMT_LIBRARY} -lpthread -lgfortran)
endif(SuperLUMT_LIBRARY)
endif(SuperLUMT_INCLUDE_DIR)
if(SuperLUMT_FOUND)
if(NOT SuperLUMT_FIND_QUIETLY)
message(STATUS "FindSuperLUMT: Found both headers and library")
endif(NOT SuperLUMT_FIND_QUIETLY)
else(SuperLUMT_FOUND)
if(SuperLUMT_FIND_REQUIRED)
message(FATAL_ERROR "FindSuperLUMT: Could not find headers and/or library")
endif(SuperLUMT_FIND_REQUIRED)
endif(SuperLUMT_FOUND)
Supports Markdown
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