Commit 73772d03 authored by Praetorius, Simon's avatar Praetorius, Simon

petsc, mpi, parmetis and metis configuration updated

parent 941d28f2
......@@ -101,7 +101,7 @@ if (AMDIS_HAS_PARALLEL_DOMAIN)
HAVE_PARALLEL_DOMAIN_AMDIS=1)
include(target_enable_petsc)
target_enable_mpi(amdis_base INTERFACE)
target_enable_mpi(amdis_base INTERFACE ON)
target_enable_petsc(amdis_base INTERFACE ON)
endif (AMDIS_HAS_PARALLEL_DOMAIN)
......
......@@ -222,9 +222,9 @@ endif (ENABLE_COMPOSITE_FEM)
# ------------------------------------------------------------------------------
if (MSVC)
target_compile_definitions(amdis PRIVATE
_SCL_SECURE_NO_WARNINGS
_CRT_SECURE_NO_WARNINGS)
target_compile_definitions(amdis PRIVATE
_SCL_SECURE_NO_WARNINGS
_CRT_SECURE_NO_WARNINGS)
endif (MSVC)
target_link_libraries(amdis AMDiS::base muparser
......
......@@ -27,7 +27,7 @@ macro(target_enable_petsc _TARGET_ _SCOPE_)
endif ()
# PETSc library is required
find_package(petsc QUIET)
find_package(PETSc QUIET)
if (PETSc_FOUND)
set(PETSC_INCLUDE_DIRS ${PETSC_INCLUDES})
set(PETSC_LIBRARY_DIRS ${PETSC_LIB_DIR})
......@@ -64,7 +64,7 @@ macro(target_enable_petsc _TARGET_ _SCOPE_)
# parmetis is required
find_file(PARMETIS_HEADER_FILE "parmetis.h"
HINTS ${PARMETIS_DIR}/include ${PETSC_INCLUDE_DIRS})
HINTS ${PARMETIS_DIR}/include ${PETSC_INCLUDE_DIRS} /usr/include/parmetis)
if (PARMETIS_HEADER_FILE)
get_filename_component(PARMETIS_INCLUDE_PATH "${PARMETIS_HEADER_FILE}" PATH CACHE)
target_include_directories(${_TARGET_} ${_SCOPE_} ${PARMETIS_INCLUDE_PATH})
......@@ -78,13 +78,14 @@ macro(target_enable_petsc _TARGET_ _SCOPE_)
if (NOT PARMETIS_LIB)
message(FATAL_ERROR "Could not find the ParMetis libraries needed by amdis")
endif (NOT PARMETIS_LIB)
message(STATUS " Found ParMetis library ${PARMETIS_LIB}")
target_link_libraries(${_TARGET_} ${_SCOPE_} ${PARMETIS_LIB})
endif (LINK_EXECUTABLE)
# metis is required
find_file(METIS_HEADER_FILE "metis.h"
HINTS ${METIS_DIR}/include ${PARMETIS_DIR}/include ${PETSC_INCLUDE_DIRS})
HINTS ${METIS_DIR}/include ${PETSC_INCLUDE_DIRS} /usr/include/metis)
if (METIS_HEADER_FILE)
get_filename_component(METIS_INCLUDE_PATH "${METIS_HEADER_FILE}" PATH CACHE)
target_include_directories(${_TARGET_} ${_SCOPE_} ${METIS_INCLUDE_PATH})
......@@ -94,10 +95,11 @@ macro(target_enable_petsc _TARGET_ _SCOPE_)
if (LINK_EXECUTABLE)
find_library(METIS_LIB metis
HINTS ${METIS_DIR}/lib ${PARMETIS_DIR}/lib ${PETSC_LIBRARY_DIRS})
HINTS ${METIS_DIR}/lib ${PETSC_LIBRARY_DIRS})
if (NOT METIS_LIB)
message(FATAL_ERROR "Could not find the MEtis libraries needed by amdis")
message(FATAL_ERROR "Could not find the Metis libraries needed by amdis")
endif (NOT METIS_LIB)
message(STATUS " Found Metis library ${METIS_LIB}")
target_link_libraries(${_TARGET_} ${_SCOPE_} ${METIS_LIB})
endif (LINK_EXECUTABLE)
......
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