Commit 75441912 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

AMDiSConfig file optimized, pugixml restructured, and extensions compile errors removed

parent c5e96515
......@@ -38,7 +38,7 @@ option(ENABLE_MPI "Compile with MPI compiler and library" false)
option(ENABLE_UMFPACK "Enable support for the UMFPACK solver" true)
option(ENABLE_EXTENSIONS "Use extensions for AMDiS" false)
option(ENABLE_HYPRE "Use HYPRE AMG solver" false)
option(ENABLE_PNG "Use png reader/writer" false)
#option(ENABLE_PNG "Use png reader/writer" false) # NOTE: currently not working
# additional options for parallel_domain
# {
......
......@@ -3,37 +3,55 @@
get_filename_component(AMDiS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(CMAKE_MODULE_PATH "${AMDiS_CMAKE_DIR}" ${CMAKE_MODULE_PATH})
include(CMakeFindDependencyMacro)
include(target_enable_boost)
include(FeatureSummary)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: Debug Release [RelWithDebInfo] MinSizeRel."
FORCE)
endif ()
# adopt pahts from AMDiS installation
include(find_dependencies)
# global dependencies
find_dependency(Boost ${Boost_VERSION_EXACT} REQUIRED COMPONENTS ${Boost_COMPONENTS})
find_dependency(MTL REQUIRED)
target_enable_boost()
find_dependency(MuParser REQUIRED)
find_dependency(nanoflann)
find_dependency(PugiXML)
if (NOT AMDiS_FIND_REQUIRED_SEQUENTIAL AND NOT AMDiS_FIND_REQUIRED_PARALLEL)
set (AMDiS_FIND_REQUIRED_SEQUENTIAL 1)
endif ()
# add sequential/parallel dependencies and add the amdis import target
if(AMDiS_FIND_REQUIRED_SEQUENTIAL AND NOT TARGET AMDiS::AMDiS-s)
find_dependency(UMFPACK)
find_dependency(HYPRE)
find_dependency(PNG)
find_dependency(PETSc)
find_dependency(UMFPACK ${UMFPACK_VERSION_EXACT})
find_dependency(HYPRE ${HYPRE_VERSION_EXACT})
#find_dependency(PNG ${PNG_VERSION_EXACT} QUIET)
find_dependency(PETSc ${PETSc_VERSION_EXACT})
find_dependency(MPI)
include("${AMDiS_CMAKE_DIR}/AMDiSTargets-s.cmake")
set(AMDiS_SEQUENTIAL_FOUND TRUE)
elseif(AMDiS_FIND_REQUIRED_PARALLEL AND NOT TARGET AMDiS::AMDiS-p)
include(AMDiSTargets-s OPTIONAL RESULT_VARIABLE AMDiS_SEQUENTIAL_FOUND)
if (NOT AMDiS_SEQUENTIAL_FOUND)
# fallback to parallel version of sequential does not exist
set(AMDiS_FIND_REQUIRED_PARALLEL 1)
endif (NOT AMDiS_SEQUENTIAL_FOUND)
endif()
if(AMDiS_FIND_REQUIRED_PARALLEL AND NOT TARGET AMDiS::AMDiS-p)
find_dependency(MPI REQUIRED)
find_dependency(PETSc REQUIRED)
find_dependency(Zoltan)
find_dependency(BDDCML)
include("${AMDiS_CMAKE_DIR}/AMDiSTargets-p.cmake")
set(AMDiS_PARALLEL_FOUND TRUE)
find_dependency(PETSc ${PETSc_VERSION_EXACT} REQUIRED)
find_dependency(Zoltan ${Zoltan_VERSION_EXACT})
find_dependency(BDDCML ${BDDCML_VERSION_EXACT})
include(AMDiSTargets-p OPTIONAL RESULT_VARIABLE AMDiS_PARALLEL_FOUND)
endif()
# add alias AMDiS that links to the sequential version by default
# only if component=PARALLEL it links to the parallel version
if (AMDiS_FIND_REQUIRED_SEQUENTIAL OR NOT AMDiS_FIND_REQUIRED_PARALLEL)
if (AMDiS_SEQUENTIAL_FOUND)
add_library(AMDiS INTERFACE)
target_link_libraries(AMDiS INTERFACE AMDiS::AMDiS-s)
elseif (AMDiS_FIND_REQUIRED_PARALLEL)
elseif (AMDiS_PARALLEL_FOUND)
add_library(AMDiS INTERFACE)
target_link_libraries(AMDiS INTERFACE AMDiS::AMDiS-p)
endif ()
......
......@@ -29,6 +29,5 @@ install(FILES
FindUMFPACK.cmake
FindZoltan.cmake
parse_zoltan_makefile.cmake
target_enable_boost.cmake
target_enable_cxx11.cmake
DESTINATION ${INSTALL_CONFIG_DIR})
......@@ -17,7 +17,6 @@ mark_as_advanced(BDDCML_FOUND BDDCML_INCLUDE_DIR BDDCML_LIBRARY)
find_library(BDDCML_LIBRARY bddcml
HINTS
${AMDIS_BDDCML_ROOT_DIR}
${BDDCML_ROOT}
${PETSC_LIBRARY_DIRS}
ENV BDDCML_ROOT
......@@ -28,7 +27,6 @@ find_library(BDDCML_LIBRARY bddcml
find_file(BDDCML_HEADER bddcml_interface_c.h
HINTS
${AMDIS_BDDCML_ROOT_DIR}
${BDDCML_ROOT}
${PETSC_INCLUDE_DIRS}
ENV BDDCML_ROOT
......
......@@ -13,11 +13,10 @@
# Author: Simon Praetorius <simon.praetorius@tu-dresden.de>
mark_as_advanced(HYPRE_FOUND HYPRE_LIBRARY HYPRE_HEADER)
mark_as_advanced(HYPRE_FOUND HYPRE_VERSION HYPRE_LIBRARY HYPRE_HEADER HYPRE_INCLUDE_DIR HYPRE_LIB_DIR)
find_library(HYPRE_LIBRARY HYPRE
HINTS
${AMDIS_HYPRE_ROOT_DIR}
${HYPRE_ROOT}
${PETSC_LIBRARY_DIRS}
ENV HYPRE_ROOT
......@@ -28,7 +27,6 @@ find_library(HYPRE_LIBRARY HYPRE
find_file(HYPRE_HEADER HYPRE.h
HINTS
${AMDIS_HYPRE_ROOT_DIR}
${HYPRE_ROOT}
${PETSC_INCLUDE_DIRS}
ENV HYPRE_ROOT
......@@ -36,18 +34,26 @@ find_file(HYPRE_HEADER HYPRE.h
PATH_SUFFIXES include/
DOC "Headerfile hypre.h for HYPRE"
)
if (HYPRE_HEADER)
get_filename_component(HYPRE_INCLUDE_DIR ${HYPRE_HEADER} PATH)
# extract HYPRE version number
file(STRINGS ${HYPRE_INCLUDE_DIR}/HYPRE_config.h HYPRE_VERSION_LINE REGEX "#define HYPRE_RELEASE_VERSION")
string(REGEX MATCH "([0-9]+[.][0-9]+[.][0-9]+)" HYPRE_VERSION_REGEX ${HYPRE_VERSION_LINE})
set(HYPRE_VERSION ${CMAKE_MATCH_1})
endif (HYPRE_HEADER)
find_package(MPI QUIET COMPONENTS CXX)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HYPRE
REQUIRED_VARS HYPRE_LIBRARY HYPRE_HEADER MPI_FOUND
VERSION_VAR HYPRE_VERSION
)
if(HYPRE_FOUND AND MPI_FOUND AND NOT TARGET HYPRE::HYPRE)
add_library(HYPRE::HYPRE INTERFACE IMPORTED)
get_filename_component(HYPRE_INCLUDE_DIR ${HYPRE_HEADER} PATH)
get_filename_component(HYPRE_LIB_DIR ${HYPRE_LIBRARY} PATH)
file(GLOB HYPRE_LIBS ${HYPRE_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}HYPRE*${CMAKE_SHARED_LIBRARY_SUFFIX})
list(APPEND HYPRE_LIBS ${HYPRE_LIBRARY})
......
......@@ -52,9 +52,9 @@ find_package(ZLIB ${_FIND_ZLIB_ARG})
if(ZLIB_FOUND)
find_path(PNG_PNG_INCLUDE_DIR png.h HINTS ${PNG_ROOT} ENV PNG_ROOT PATH_SUFFIXES include include/libpng include/libpng16)
if (NOT PNG_PNG_INCLUDE_DIR)
message(FATAL_ERROR "PNG header png.h not found. Specify PNG_ROOT as root directory of your PNG installation")
endif ()
#if (NOT PNG_PNG_INCLUDE_DIR)
# message(FATAL_ERROR "PNG header png.h not found. Specify PNG_ROOT as root directory of your PNG installation")
#endif ()
list(APPEND PNG_NAMES png libpng)
unset(PNG_NAMES_DEBUG)
......@@ -80,9 +80,9 @@ if(ZLIB_FOUND)
if(NOT PNG_LIBRARY)
find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES} HINTS ${PNG_ROOT} ENV PNG_ROOT PATH_SUFFIXES lib lib64)
find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG} HINTS ${PNG_ROOT} ENV PNG_ROOT PATH_SUFFIXES lib lib64)
if (NOT PNG_LIBRARY_RELEASE AND NOT PNG_LIBRARY_DEBUG)
message(FATAL_ERROR "PNG library {${PNG_NAMES}} not found. Specify PNG_ROOT as root directory of your PNG installation")
endif ()
#if (NOT PNG_LIBRARY_RELEASE AND NOT PNG_LIBRARY_DEBUG)
# message(FATAL_ERROR "PNG library {${PNG_NAMES}} not found. Specify PNG_ROOT as root directory of your PNG installation")
#endif ()
include(SelectLibraryConfigurations)
select_library_configurations(PNG)
......@@ -98,7 +98,7 @@ if(ZLIB_FOUND)
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
# png.h includes zlib.h. Sigh.
set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatibility
set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS}) # for backward compatibility
set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
if (CYGWIN)
......@@ -143,8 +143,8 @@ if(ZLIB_FOUND)
string(REGEX REPLACE "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\"([^\"]+)\".*" "\\1" PNG_VERSION_STRING "${png_version_str}")
unset(png_version_str)
endif ()
else()
message(FATAL_ERROR "zlib required for PNG. Specify ZLIB_ROOT as root directory of your zlib installation.")
#else()
# message(FATAL_ERROR "zlib required for PNG. Specify ZLIB_ROOT as root directory of your zlib installation.")
endif()
include(FindPackageHandleStandardArgs)
......
......@@ -15,11 +15,10 @@
# Author: Simon Praetorius <simon.praetorius@tu-dresden.de>
mark_as_advanced(UMFPACK_FOUND UMFPACK_LIBRARY UMFPACK_HEADER)
mark_as_advanced(UMFPACK_FOUND UMFPACK_VERSION UMFPACK_LIBRARY UMFPACK_HEADER UMFPACK_INCLUDE_DIR)
find_library(UMFPACK_LIBRARY umfpack
HINTS
${AMDIS_UMFPACK_ROOT_DIR}
${SUITESPARSE_ROOT}
ENV SUITESPARSE_ROOT
ENV EBROOTSUITESPARSE
......@@ -29,23 +28,30 @@ find_library(UMFPACK_LIBRARY umfpack
find_file(UMFPACK_HEADER umfpack.h
HINTS
${AMDIS_UMFPACK_ROOT_DIR}
${SUITESPARSE_ROOT}
ENV SUITESPARSE_ROOT
ENV EBROOTSUITESPARSE
PATH_SUFFIXES include/ include/suitesparse/ include/ufsparse/
DOC "Headerfile umfpack.h for UMFPACK"
)
if (UMFPACK_HEADER)
# extract version of umfpack from umfpack.h
file(STRINGS ${UMFPACK_HEADER} UMFPACK_VERSION_LINE REGEX "#define UMFPACK_VERSION")
string(REGEX MATCH "\"UMFPACK V([0-9]+)\.([0-9]+)\.([0-9]+).*\"" UMFPACK_VERSION_REGEX ${UMFPACK_VERSION_LINE})
set(UMFPACK_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
endif (UMFPACK_HEADER)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(UMFPACK
REQUIRED_VARS UMFPACK_LIBRARY UMFPACK_HEADER
VERSION_VAR UMFPACK_VERSION
)
if(UMFPACK_FOUND AND NOT TARGET UMFPACK::UMFPACK)
add_library(UMFPACK::UMFPACK INTERFACE IMPORTED)
get_filename_component(UMFPACK_INCLUDE_DIR ${UMFPACK_HEADER} PATH)
#set(UMFPACK_INCLUDE_DIR ${UMFPACK_INCLUDE_DIR} PARENT_SCOPE)
set_target_properties(UMFPACK::UMFPACK PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${UMFPACK_INCLUDE_DIR}"
)
......
......@@ -15,13 +15,13 @@
# Author: Simon Praetorius <simon.praetorius@tu-dresden.de>
mark_as_advanced(Zoltan_FOUND ZOLTAN_INCLUDE_DIR ZOLTAN_LIBS)
mark_as_advanced(Zoltan_FOUND Zoltan_VERSION ZOLTAN_INCLUDE_DIR ZOLTAN_LIBS)
find_package(Zoltan QUIET)
if (Zoltan_FOUND)
find_file(ZOLTAN_HEADER zoltan.h HINTS ${Zoltan_INCLUDE_DIRS})
if (ZOLTAN_HEADER)
set(ZOLTAN_INCLUDE_DIR ${Zoltan_INCLUDE_DIRS})
set(ZOLTAN_INCLUDE_DIR ${Zoltan_INCLUDE_DIRS} PARENT_SCOPE)
endif (ZOLTAN_HEADER)
set(ZOLTAN_LIBS "")
......@@ -44,7 +44,12 @@ else (Zoltan_FOUND)
PATH_SUFFIXES include/
)
if (ZOLTAN_HEADER)
get_filename_component(ZOLTAN_INCLUDE_DIR "${ZOLTAN_HEADER}" PATH CACHE)
get_filename_component(ZOLTAN_INCLUDE_DIR "${ZOLTAN_HEADER}" PATH)
# extract Zoltan version number
file(STRINGS ${ZOLTAN_HEADER} ZOLTAN_VERSION_LINE REGEX "#define ZOLTAN_VERSION_NUMBER")
string(REGEX MATCH "([0-9]+[.][0-9]+)" ZOLTAN_VERSION_REGEX ${ZOLTAN_VERSION_LINE})
set(Zoltan_VERSION ${CMAKE_MATCH_1})
endif (ZOLTAN_HEADER)
find_library(ZOLTAN_LIB zoltan
......@@ -70,6 +75,7 @@ endif (Zoltan_FOUND)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Zoltan
REQUIRED_VARS ZOLTAN_INCLUDE_DIR ZOLTAN_LIBS
VERSION_VAR Zoltan_VERSION
CONFIG_MODE
)
......@@ -80,11 +86,4 @@ if(Zoltan_FOUND AND NOT TARGET Zoltan::Zoltan)
INTERFACE_INCLUDE_DIRECTORIES "${ZOLTAN_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${ZOLTAN_LIBS}"
)
# extract Zoltan version number
if (ZOLTAN_HEADER)
file(STRINGS ${ZOLTAN_HEADER} ZOLTAN_VERSION_LINE REGEX "#define ZOLTAN_VERSION_NUMBER")
string(REGEX MATCH "([0-9]+[.][0-9]+)" ZOLTAN_VERSION_REGEX ${ZOLTAN_VERSION_LINE})
set(Zoltan_VERSION ${CMAKE_MATCH_1})
endif (ZOLTAN_HEADER)
endif()
if (NOT BOOST_ROOT)
set(_DIRS @Boost_INCLUDE_DIRS@)
list(GET _DIRS 0 _DIR)
file(TO_CMAKE_PATH "${_DIR}/.." BOOST_ROOT)
unset(_DIR)
unset(_DIRS)
endif (NOT BOOST_ROOT)
#set(Boost_VERSION "@Boost_VERSION@")
set(Boost_COMPONENTS "@BOOST_LIBS_REQUIRED@")
set(Boost_USE_STATIC_LIBS @Boost_USE_STATIC_LIBS@)
if (Boost_VERSION)
set(Boost_VERSION_EXACT "${Boost_VERSION}" EXACT)
endif (Boost_VERSION)
if (NOT PETSC_ROOT)
file(TO_CMAKE_PATH "@PETSC_PKG_CONFIG@/../.." PETSC_ROOT)
endif (NOT PETSC_ROOT)
set(PETSc_VERSION "@PETSc_VERSION@")
if (PETSc_VERSION)
set(PETSc_VERSION_EXACT "${PETSc_VERSION}" EXACT)
endif (PETSc_VERSION)
if (NOT SUITESPARSE_ROOT)
file(TO_CMAKE_PATH "@UMFPACK_INCLUDE_DIR@/.." SUITESPARSE_ROOT)
endif (NOT SUITESPARSE_ROOT)
set(UMFPACK_VERSION "@UMFPACK_VERSION@")
if (UMFPACK_VERSION)
set(UMFPACK_VERSION_EXACT "${UMFPACK_VERSION}" EXACT)
endif (UMFPACK_VERSION)
if (NOT HYPRE_ROOT)
file(TO_CMAKE_PATH "@HYPRE_INCLUDE_DIR@/.." HYPRE_ROOT)
endif (NOT HYPRE_ROOT)
set(HYPRE_VERSION "@HYPRE_VERSION@")
if (HYPRE_VERSION)
set(HYPRE_VERSION_EXACT "${HYPRE_VERSION}" EXACT)
endif (HYPRE_VERSION)
if (NOT PNG_ROOT)
file(TO_CMAKE_PATH "@PNG_INCLUDE_DIR@/.." PNG_ROOT)
endif (NOT PNG_ROOT)
set(PNG_VERSION "@PNG_VERSION@")
if (PNG_VERSION)
set(PNG_VERSION_EXACT "${PNG_VERSION}" EXACT)
endif (PNG_VERSION)
if (NOT ZLIB_ROOT)
file(TO_CMAKE_PATH "@ZLIB_INCLUDE_DIR@/.." ZLIB_ROOT)
endif (NOT ZLIB_ROOT)
set(ZLIB_VERSION "@ZLIB_VERSION@")
if (ZLIB_VERSION)
set(ZLIB_VERSION_EXACT "${ZLIB_VERSION}" EXACT)
endif (ZLIB_VERSION)
if (NOT ZOLTAN_ROOT)
file(TO_CMAKE_PATH "@ZOLTAN_INCLUDE_DIR@/.." ZOLTAN_ROOT)
endif (NOT ZOLTAN_ROOT)
set(Zoltan_VERSION "@Zoltan_VERSION@")
if (Zoltan_VERSION)
set(Zoltan_VERSION_EXACT "${Zoltan_VERSION}" EXACT)
endif (Zoltan_VERSION)
if (NOT BDDCML_ROOT)
file(TO_CMAKE_PATH "@BDDCML_INCLUDE_DIR@/.." BDDCML_ROOT)
endif (NOT BDDCML_ROOT)
set(BDDCML_VERSION "@BDDCML_VERSION@")
if (BDDCML_VERSION)
set(BDDCML_VERSION_EXACT "${BDDCML_VERSION}" EXACT)
endif (BDDCML_VERSION)
macro(target_enable_boost)
if (BOOST_ROOT)
file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT)
endif (BOOST_ROOT)
if (BOOST_LIBRARYDIR)
file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR)
endif (BOOST_LIBRARYDIR)
set(BOOST_VERSION "1.48")
set(BOOST_LIBS_REQUIRED system iostreams filesystem program_options date_time)
if (WIN32)
list(APPEND BOOST_LIBS_REQUIRED zlib)
if (ENABLE_COMPRESSION OR AMDIS_NEED_COMPRESSION)
list(APPEND BOOST_LIBS_REQUIRED bzip2)
endif (ENABLE_COMPRESSION OR AMDIS_NEED_COMPRESSION)
endif (WIN32)
if (NOT BUILD_SHARED_LIBS)
set(Boost_USE_STATIC_LIBS ON)
endif (NOT BUILD_SHARED_LIBS)
find_package(Boost ${BOOST_VERSION} REQUIRED COMPONENTS ${BOOST_LIBS_REQUIRED})
if (${ARGC} GREATER 0)
foreach (_C ${BOOST_LIBS_REQUIRED})
target_link_libraries(${ARGV0} Boost::${_C})
endforeach ()
endif ()
endmacro(target_enable_boost)
......@@ -4,16 +4,16 @@ project(muparser VERSION 1.34 LANGUAGES CXX)
include(GNUInstallDirs)
set(PUGIXML_HEADERS
src/pugiconfig.hpp
src/pugixml.hpp)
include/pugixml/pugiconfig.hpp
include/pugixml/pugixml.hpp)
set(PUGIXML_SOURCES src/pugixml.cpp)
add_library(PugiXML ${PUGIXML_HEADERS} ${PUGIXML_SOURCES})
add_library(PugiXML::PugiXML ALIAS PugiXML)
target_include_directories(PugiXML
PUBLIC
$<INSTALL_INTERFACE:include/pugixml>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/PugiXMLConfig.cmake.in
......
......@@ -11,7 +11,7 @@
* Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
*/
#include "pugixml.hpp"
#include "pugixml/pugixml.hpp"
#include <stdlib.h>
#include <stdio.h>
......
# Include macros
include(target_enable_cxx11)
include(target_enable_boost)
set(AMDIS_HEADERS
AMDiS.h
......@@ -255,7 +254,7 @@ set_target_properties(AMDiS${POSTFIX}
target_enable_cxx14(SUPPORTS_CXX14 AMDiS${POSTFIX} PUBLIC)
if (SUPPORTS_CXX14)
target_compile_definitions(AMDiS${POSTFIX} PRIVATE "AMDIS_HAS_CXX14=1")
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "AMDIS_HAS_CXX14=1")
else ()
target_enable_cxx11(SUPPORTS_CXX11 AMDiS${POSTFIX} PUBLIC)
endif ()
......@@ -263,16 +262,32 @@ endif ()
if (NOT SUPPORTS_CXX11 AND NOT SUPPORTS_CXX14)
message(FATAL_ERROR "AMDiS needs at least c++11, but the current compiler does not support this standard!")
endif ()
target_compile_definitions(AMDiS${POSTFIX} PRIVATE "AMDIS_HAS_CXX11=1")
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "AMDIS_HAS_CXX11=1")
# configure external packages
# ---------------------------
set(BOOST_LIBS_REQUIRED system iostreams filesystem program_options date_time)
if (WIN32)
list(APPEND BOOST_LIBS_REQUIRED zlib)
if (ENABLE_COMPRESSION)
list(APPEND BOOST_LIBS_REQUIRED bzip2)
endif (ENABLE_COMPRESSION)
endif (WIN32)
if (NOT BUILD_SHARED_LIBS)
set(Boost_USE_STATIC_LIBS ON)
endif (NOT BUILD_SHARED_LIBS)
find_package(Boost 1.48 REQUIRED COMPONENTS ${BOOST_LIBS_REQUIRED})
foreach (_C ${BOOST_LIBS_REQUIRED})
target_link_libraries(AMDiS${POSTFIX} Boost::${_C})
endforeach (_C)
unset(_C CACHE)
find_package(MTL REQUIRED)
target_link_libraries(AMDiS${POSTFIX} MTL::MTL)
target_enable_boost(AMDiS${POSTFIX})
find_package(MuParser 1.34 CONFIG REQUIRED)
target_link_libraries(AMDiS${POSTFIX} MuParser::MuParser)
......@@ -289,7 +304,7 @@ if (ENABLE_MPI OR ENABLE_PARALLEL_DOMAIN)
endif ()
if (ENABLE_COMPRESSION)
target_compile_definitions(AMDiS${POSTFIX} PRIVATE "AMDIS_HAS_COMPRESSION=1")
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "AMDIS_HAS_COMPRESSION=1")
endif (ENABLE_COMPRESSION)
if (ENABLE_UMFPACK)
......@@ -306,7 +321,7 @@ endif (ENABLE_HYPRE)
if (ENABLE_SEQ_PETSC OR ENABLE_PARALLEL_DOMAIN)
find_package(PETSc 3.3 REQUIRED)
target_link_libraries(AMDiS${POSTFIX} PETSc::PETSc)
target_compile_definitions(AMDiS${POSTFIX} PRIVATE "PETSC_VERSION=${PETSc_VERSION}")
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "PETSC_VERSION=${PETSc_VERSION}")
endif ()
if (ENABLE_PARALLEL_DOMAIN)
......@@ -341,6 +356,11 @@ if (ENABLE_BASE_PROBLEMS)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_BASE_PROBLEMS=1")
endif (ENABLE_BASE_PROBLEMS)
configure_file(${CMAKE_SOURCE_DIR}/cmake/find_dependencies.cmake.in
${CMAKE_BINARY_DIR}/cmake/find_dependencies.cmake
@ONLY
)
# install files
# -------------
......@@ -363,6 +383,10 @@ install(EXPORT AMDiS-export
DESTINATION ${CMAKE_INSTALL_LIBDIR}/amdis/cmake
)
install(FILES
${CMAKE_BINARY_DIR}/cmake/find_dependencies.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/amdis/cmake)
# exports
export(EXPORT AMDiS-export
FILE ${CMAKE_CURRENT_BINARY_DIR}/AMDiSTargets.cmake
......
......@@ -15,11 +15,9 @@
*
******************************************************************************/
#include "time/ExtendedRosenbrockAdaptInstationary.h"
#include "AdaptInfo.h"
#include "ProblemTimeInterface.h"
#include "VectorOperations.h"
#include "extensions/VectorOperations.h"
namespace AMDiS { namespace extensions {
......
......@@ -16,13 +16,13 @@
******************************************************************************/
#include "time/ExtendedRosenbrockStationary.h"
#include "ExtendedRosenbrockStationary.h"
#include "io/VtkWriter.h"
#include "SystemVector.h"
#include "solver/LinearSolver.h"
#include "Debug.h"
#include "POperators_ZOT.h"
#include "VectorOperations.h"
#include "extensions/POperators_ZOT.h"
#include "extensions/VectorOperations.h"
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#include "parallel/MeshDistributor.h"
......
......@@ -23,9 +23,9 @@
#define MY_ROSENBROCKSTATIONARY_H
#include "AMDiS_fwd.h"
#include "ExtendedProblemStat.h"
#include "SystemVector.h"
#include "time/RosenbrockMethod.h"
#include "extensions/ExtendedProblemStat.h"
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#include "parallel/ParallelProblemStat.h"
......
......@@ -26,10 +26,10 @@
#include "Mesh.h"
#include "boost/filesystem.hpp"
#include "pugixml.hpp"
#include "pugixml/pugixml.hpp"
// extension {
#include "kdtree_nanoflann.h"
#include "VectorOperations.h"
#include "extensions/kdtree_nanoflann.h"
#include "extensions/VectorOperations.h"
// }
#include "detail/VtkReader.h"
......
......@@ -38,10 +38,10 @@
#include "DOFVector.h"
#include "Mesh.h"
#include "boost/filesystem.hpp"
#include "pugixml.hpp"
#include "pugixml/pugixml.hpp"
// extensions {
#include "kdtree_nanoflann.h"
#include "VectorOperations.h"
#include "extensions/kdtree_nanoflann.h"
#include "extensions/VectorOperations.h"
// }
#define BLOCKSIZE 32768
......
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