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