Commit 8f1a5984 authored by Naumann, Andreas's avatar Naumann, Andreas

extended cmake install process

parent 547802d5
set(AMDiS_INCLUDE_DIR ${AMDiS_DIR}/include ${AMDiS_DIR}/mtl4)
set(MTL_DIR ${AMDiS_DIR}/mtl4 CACHE PATH "the mtl directory")
set(AMDiS_INCLUDE_DIR ${AMDiS_DIR}/include ${MTL_DIR})
set(AMDiS_LIBRARIES amdis compositeFEM)
set(AMDiS_LIBRARY_DIRS ${AMDiS_DIR}/lib)
find_package(Boost 1.42 REQUIRED)
if(Boost_FOUND)
set(AMDiS_LIBRARIES ${AMDiS_LIBRARIES} boost_system boost_iostreams)
set(AMDiS_LIBRARY_DIRS ${AMDiS_LIBRARY_DIRS} ${Boost_INCLUDE_DIR})
endif(Boost_FOUND)
set(AMDiS_NEED_PARMETIS @ENABLE_PARMETIS@)
set(AMDiS_HAS_PARALLEL_DOMAIN @ENABLE_PARALLEL_DOMAIN@)
set(AMDiS_NEED_UMFPACK @ENABLE_UMFPACK@)
set(AMDiS_NEED_MKL @ENABLE_MKL@)
set(AMDiS_NEED_DUNE @ENABLE_DUNE@)
set(AMDiS_USE_FILE ${AMDiS_DIR}/AMDiSUse.cmake)
set(AMDiS_COMPILEFLAGS "@COMPILEFLAGS@")
message("find-components: ${AMDiS_FIND_COMPONENTS}")
if(AMDiS_NEED_UMFPACK)
set(BLAS_LIBRARY_DIR "" CACHE STRING "the blas library directory")
set(BLAS_LIBRARY "blas" CACHE STRING "the blas library")
set(AMDiS_LIBRARIES ${AMDiS_LIBRARIES} umfpack amd ${BLAS_LIBRARY})
set(AMDiS_LIBRARY_DIRS ${AMDiS_LIBRARY_DIRS} ${AMDiS_DIR}/umfpack ${AMDiS_DIR}/amd ${BLAS_LIBRARY_DIR})
set(AMDiS_INCLUDE_DIR ${AMDiS_INCLUDE_DIR}
${AMDiS_DIR}/umfpack/include/
${AMDiS_DIR}/amd/include
${AMDiS_DIR}/ufconfig
${AMDiS_DIR}/ufconfig/xerbla
)
endif(AMDiS_NEED_UMFPACK)
if(${AMDiS_FIND_COMPONENTS} MATCHES umfpack )
if( ${AMDiS_NEED_UMFPACK} )
set(AMDiS_LIBRARIES ${AMDiS_LIBRARIES} umfpack)
if( AMDiS_NEED_UMFPACK )
set(AMDiS_LIBRARIES ${AMDiS_LIBRARIES} umfpack blas)
else()
set( AMDiS_umfpack_FOUND FALSE)
message(SEND_ERROR "the selected amdis was not compiled with umfpack")
......
......@@ -152,6 +152,11 @@ if(ENABLE_PARMETIS)
${SOURCE_DIR}/ParallelProblem.cc ${SOURCE_DIR}/ParMetisPartitioner.cc
${SOURCE_DIR}/PollutionError.cc)
SET(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_PARALLEL_AMDIS=1")
INSTALL(FILES ${LIB_DIR}/ParMetis-3.1/parmetis.h
${LIB_DIR}/ParMetis-3.1/libparmetis.a
${LIB_DIR}/ParMetis-3.1/libmetis.a
DESTINATION amdis/parmetis
)
endif(ENABLE_PARMETIS)
if(ENABLE_PARALLEL_DOMAIN)
......@@ -181,6 +186,21 @@ endif(ENABLE_OPENMP)
if(ENABLE_UMFPACK)
include_directories(${LIB_DIR}/UFconfig ${LIB_DIR}/AMD/Include ${LIB_DIR}/UMFPACK/Include)
SET(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_UMFPACK=1 -DMTL_HAS_UMFPACK")
FILE(GLOB UMFPACK_HEADERS "${LIB_DIR}/UMFPACK/Include/*.h")
INSTALL(FILES ${UMFPACK_HEADERS} DESTINATION amdis/umfpack/include)
FILE(GLOB UMFPACK_HEADERS "${LIB_DIR}/AMD/Include/*.h")
INSTALL(FILES ${UMFPACK_HEADERS} DESTINATION amdis/amd/include)
FILE(GLOB HEADERS "${LIB_DIR}/UFconfig/*.h")
INSTALL(FILES ${HEADERS} DESTINATION amdis/ufconfig/)
FILE(GLOB HEADERS "${LIB_DIR}/UFconfig/xerbla/*.h")
INSTALL(FILES ${HEADERS} DESTINATION amdis/ufconfig/xerbla)
INSTALL(FILES ${LIB_DIR}/UMFPACK/Lib/libumfpack.a DESTINATION amdis/umfpack/)
INSTALL(FILES ${LIB_DIR}/AMD/Lib/libamd.a DESTINATION amdis/amd/)
endif(ENABLE_UMFPACK)
if(ENABLE_MKL)
......
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