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

extended petsc support with cmake and wrong library path with parmetis

parent f9a324f2
...@@ -89,9 +89,10 @@ if(${AMDiS_FIND_COMPONENTS} MATCHES umfpack ) ...@@ -89,9 +89,10 @@ if(${AMDiS_FIND_COMPONENTS} MATCHES umfpack )
endif() endif()
if( AMDiS_NEED_PARMETIS ) if( AMDiS_NEED_PARMETIS )
list(APPEND AMDiS_LIBRARY_DIRS ${AMDiS_LIBRARY_DIR}/parmetis)
list(APPEND AMDiS_LIBRARIES parmetis metis) list(APPEND AMDiS_LIBRARIES parmetis metis)
endif() endif()
if(${AMDiS_FIND_COMPONENTS} MATCHES parmetis AND NOT ${AMDiS_NEED_PARMETIS}) if(${AMDiS_FIND_COMPONENTS} MATCHES parmetis AND NOT AMDiS_NEED_PARMETIS)
message(SEND_ERROR "amdis was not compiled with parmetis") message(SEND_ERROR "amdis was not compiled with parmetis")
endif() endif()
#load mpi-compiler for use with parmetis and parallel_domain #load mpi-compiler for use with parmetis and parallel_domain
if(${AMDiS_HAS_PARALLEL_DOMAIN}) if(AMDiS_HAS_PARALLEL_DOMAIN)
if(NOT ${AMDiS_NEED_PARMETIS}) 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..") message(SEND_ERROR "parallel domain needs parmetis, but AMDiS was not compiled with parmetis support. There's something really odd..")
else() else()
find_package(MPI REQUIRED) find_package(MPI REQUIRED)
...@@ -9,13 +9,14 @@ if(${AMDiS_HAS_PARALLEL_DOMAIN}) ...@@ -9,13 +9,14 @@ if(${AMDiS_HAS_PARALLEL_DOMAIN})
CMAKE_FORCE_CXX_COMPILER(mpicxx "The MPI C++ compiler") CMAKE_FORCE_CXX_COMPILER(mpicxx "The MPI C++ compiler")
CMAKE_FORCE_C_COMPILER(mpicc "The MPI C Compiler") CMAKE_FORCE_C_COMPILER(mpicc "The MPI C Compiler")
endif(MPI_FOUND) endif(MPI_FOUND)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${AMDiS_DIR})
find_package(PETSc REQUIRED) find_package(PETSc REQUIRED)
if(PETSC_FOUND) if(PETSC_FOUND)
list(APPEND AMDiS_LIBRARIES ${PETSC_LIBRARIES}) list(APPEND AMDiS_LIBRARIES ${PETSC_LIBRARIES})
list(APPEND AMDiS_INCLUDE_DIRS ${PETSC_INCLUDES}) list(APPEND AMDiS_INCLUDE_DIRS ${PETSC_INCLUDES})
endif(PETSc_FOUND) endif(PETSC_FOUND)
endif(NOT ${AMDiS_NEED_PARMETIS}) endif(NOT AMDiS_NEED_PARMETIS)
endif(${AMDiS_HAS_PARALLEL_DOMAIN}) endif(AMDiS_HAS_PARALLEL_DOMAIN)
#thats bad because it affects each target #thats bad because it affects each target
add_definitions(${AMDiS_COMPILEFLAGS}) add_definitions(${AMDiS_COMPILEFLAGS})
link_directories(${AMDiS_LIBRARY_DIRS}) link_directories(${AMDiS_LIBRARY_DIRS})
......
...@@ -167,7 +167,7 @@ if(ENABLE_PARALLEL_DOMAIN) ...@@ -167,7 +167,7 @@ if(ENABLE_PARALLEL_DOMAIN)
INSTALL(FILES ${LIB_DIR}/ParMetis-3.1/parmetis.h INSTALL(FILES ${LIB_DIR}/ParMetis-3.1/parmetis.h
${LIB_DIR}/ParMetis-3.1/libparmetis.a ${LIB_DIR}/ParMetis-3.1/libparmetis.a
${LIB_DIR}/ParMetis-3.1/libmetis.a ${LIB_DIR}/ParMetis-3.1/libmetis.a
DESTINATION lib/parmetis DESTINATION lib/amdis/parmetis
) )
set(ENABLE_PARMETIS ON) set(ENABLE_PARMETIS ON)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};/usr/share/cmake-2.8/Modules/;${CMAKE_SOURCE_DIR}/") set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};/usr/share/cmake-2.8/Modules/;${CMAKE_SOURCE_DIR}/")
...@@ -184,6 +184,8 @@ if(ENABLE_PARALLEL_DOMAIN) ...@@ -184,6 +184,8 @@ if(ENABLE_PARALLEL_DOMAIN)
${SOURCE_DIR}/parallel/ParallelProblemStatBase.cc ${SOURCE_DIR}/parallel/ParallelProblemStatBase.cc
${SOURCE_DIR}/parallel/PetscSolver.cc) ${SOURCE_DIR}/parallel/PetscSolver.cc)
SET(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_PARALLEL_DOMAIN_AMDIS=1") SET(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_PARALLEL_DOMAIN_AMDIS=1")
INSTALL(FILES ResolveCompilerPaths.cmake FindPackageMultipass.cmake FindPETSc.cmake
DESTINATION share/amdis/)
endif(ENABLE_PARALLEL_DOMAIN) endif(ENABLE_PARALLEL_DOMAIN)
if(ENABLE_OPENMP) if(ENABLE_OPENMP)
...@@ -312,6 +314,7 @@ configure_file(${AMDiS_SOURCE_DIR}/AMDiSConfig.cmake.in ...@@ -312,6 +314,7 @@ configure_file(${AMDiS_SOURCE_DIR}/AMDiSConfig.cmake.in
${AMDiS_BINARY_DIR}/AMDiSConfig.cmake ${AMDiS_BINARY_DIR}/AMDiSConfig.cmake
@ONLY @ONLY
) )
INSTALL(FILES ${AMDiS_BINARY_DIR}/AMDiSConfig.cmake INSTALL(FILES ${AMDiS_BINARY_DIR}/AMDiSConfig.cmake
DESTINATION share/amdis/) DESTINATION share/amdis/)
list(APPEND deb_add_dirs "share/amdis/") list(APPEND deb_add_dirs "share/amdis/")
......
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