Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konto der externen Nutzer:innen sind über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. The accounts of external users can be accessed via the "Standard" tab. The administrators

Commit ca1ed43c authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

packing and simplified usage (compilation determines flags like with_umfpack,...

packing and simplified usage (compilation determines flags like with_umfpack, have_parallel and additionally needed libraries)
parent e510fb3d
set(AMDiS_INCLUDE_DIR ${AMDiS_DIR}/include ${AMDiS_DIR}/mtl4)
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 OFF)
set(AMDiS_HAS_PARALLEL_DOMAIN OFF)
set(AMDiS_NEED_UMFPACK OFF)
set(AMDiS_NEED_MKL OFF)
set(AMDiS_NEED_DUNE OFF)
set(AMDiS_USE_FILE ${AMDiS_DIR}/AMDiSUse.cmake)
message("find-components: ${AMDiS_FIND_COMPONENTS}")
if(${AMDiS_FIND_COMPONENTS} MATCHES umfpack )
if( ${AMDiS_NEED_UMFPACK} )
set(AMDiS_LIBRARIES ${AMDiS_LIBRARIES} umfpack)
else()
set( AMDiS_umfpack_FOUND FALSE)
message(SEND_ERROR "the selected amdis was not compiled with umfpack")
endif()
endif()
if( ${AMDiS_NEED_PARMETIS} )
set(AMDiS_LIBRARIES ${AMDiS_LIBRARIES} parmetis metis)
endif()
if(${AMDiS_FIND_COMPONENTS} MATCHES parmetis AND NOT ${AMDiS_NEED_PARMETIS})
message(SEND_ERROR "amdis was not compiled with parmetis")
endif()
link_directories(${AMDiS_LIBRARY_DIRS})
include_directories(${AMDiS_INCLUDE_DIR})
#load mpi-compiler for use with parmetis and parallel_domain
if(${AMDiS_HAS_PARALLEL_DOMAIN})
if(NOT ${AMDiS_NEED_PARMETIS})
message(SEND_ERROR "parallel domain needs parmetis, but AMDiS was not compiled with parmetis support. There's something really odd..")
else()
find_package(MPI REQUIRED)
if(MPI_FOUND)
INCLUDE(CMakeForceCompiler)
CMAKE_FORCE_CXX_COMPILER(mpicxx "The MPI C++ compiler")
CMAKE_FORCE_C_COMPILER(mpicc "The MPI C Compiler")
endif(MPI_FOUND)
endif(NOT ${AMDiS_NEED_PARMETIS})
endif(${AMDiS_HAS_PARALLEL_DOMAIN})
project(AMDiS)
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 2.8)
set(AMDiS_SOURCE_DIR "${AMDiS_SOURCE_DIR}/src")
#needs: --enable-debug, enable-intel --enable-openmp --enable-parmetis --enable-parallel-domain --enable-umfpack --enable-mkl --enable-boost --enable-marmot
......@@ -37,7 +39,7 @@ endif(ENABLE_INTEL)
#endif(ENABLE_BOOST)
SET(LIB_DIR ./lib)
SET(SOURCE_DIR ./src)
SET(SOURCE_DIR ${AMDiS_SOURCE_DIR})
SET(AMDIS_SRC ${SOURCE_DIR}/DOFIndexed.cc
${SOURCE_DIR}/GNUPlotWriter.cc
${SOURCE_DIR}/VertexVector.cc
......@@ -205,19 +207,48 @@ include_directories(${SOURCE_DIR})
add_library(amdis SHARED ${AMDIS_SRC} ${PARALLEL_AMDIS_SRC} ${PARALLEL_DOMAIN_AMDIS_SRC})
add_library(compositeFEM SHARED ${COMPOSITE_FEM_SRC})
message("compileflags: ${COMPILEFLAGS}")
SET_TARGET_PROPERTIES(amdis PROPERTIES COMPILE_FLAGS "${COMPILEFLAGS}")
if(ENABLE_MARMOT)
Message("please set marmotcc manually")
endif(ENABLE_MARMOT)
install(TARGETS amdis compositeFEM
LIBRARY DESTINATION lib )
LIBRARY DESTINATION amdis/lib )
FILE(GLOB HEADERS "${AMDiS_SOURCE_DIR}/*.h")
INSTALL(FILES ${HEADERS} DESTINATION amdis/include)
FILE(GLOB HEADERS "${AMDiS_SOURCE_DIR}/*.hh")
INSTALL(FILES ${HEADERS} DESTINATION amdis/include)
FILE(GLOB HEADERS "${AMDiS_SOURCE_DIR}/parallel/*.h")
INSTALL(FILES ${HEADERS} DESTINATION amdis/include/parallel/)
FILE(GLOB HEADERS "${AMDiS_SOURCE_DIR}/time/*.h")
INSTALL(FILES ${HEADERS} DESTINATION amdis/include/time/)
configure_file(${AMDiS_BINARY_DIR}/AMDiSConfig.cmake.in
${AMDiS_BINARY_DIR}/AMDiSConfig.cmake
@ONLY
)
INSTALL(FILES ${AMDiS_BINARY_DIR}/AMDiSConfig.cmake DESTINATION amdis/)
INSTALL(FILES ${AMDiS_BINARY_DIR}/AMDiSUse.cmake DESTINATION amdis/)
#install mtl
INSTALL(DIRECTORY ${CMAKE_BINARY_DIR}/lib/mtl4/
DESTINATION amdis/mtl4
FILES_MATCHING PATTERN "*.hpp"
PATTERN ".svn" EXCLUDE
PATTERN ".svn/*" EXCLUDE
)
if(ENABLE_GUI)
add_subdirectory(other/tools/amdis_gui)
endif(ENABLE_GUI)
set(CPACK_PACKAGE_CONTACT "Me")
set(CPACK_BINARY_DEB "on")
set(CPACK_BINARY_RPM "on")
#set(CPACK_SET_DESTDIR "true")
set(CPACK_INSTALL_PREFIX "")
include(CPack)
if(ENABLE_TESTS)
#ENABLE_TESTING()
#add_test(demo_test run_test.sh)
......
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