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 bfc646be authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

AMDiS on Windows with VS and MinGW

parent eb7dd2a3
This diff is collapsed.
......@@ -17,11 +17,11 @@
#
#
#The AMDIS_USE_FILE adds the include and link-directories for amdis to cmake.
#
#
#If you use the parallel amdis-version, the AMDIS_USE_FILE also trys to detect
#the mpi and petsc configuration. If those versions don't fit your needs,
#you can change the corresponding directories, or simply do this work at your own
#and omit the AMDIS_USE_FILE. Then you also have to set the flags, include
#and omit the AMDIS_USE_FILE. Then you also have to set the flags, include
#and library directories.
################## ONLY WORKAROUND AND WARNING ###################
......@@ -61,9 +61,9 @@ unset(_AMDIS_LIB CACHE)
set(AMDIS_HAS_PARALLEL_DOMAIN @ENABLE_PARALLEL_DOMAIN@)
set(AMDIS_NEED_COMPRESSION @ENABLE_COMPRESSION@)
set(BOOST_LIBS_REQUIRED system iostreams filesystem program_options date_time)
set(BOOST_LIBS_REQUIRED system iostreams filesystem program_options date_time zlib)
if(WIN32 AND AMDIS_NEED_COMPRESSION)
list(APPEND BOOST_LIBS_REQUIRED zlib bzip2)
list(APPEND BOOST_LIBS_REQUIRED bzip2)
endif(WIN32 AND AMDIS_NEED_COMPRESSION)
set(BOOST_VERSION "1.42")
......@@ -117,14 +117,38 @@ if(CMAKE_BUILD_TYPE STREQUAL "")
endif()
if (AMDIS_NEED_CXX11)
# list(APPEND AMDIS_COMPILEFLAGS "-DHAS_CXX11=1")
if (${CMAKE_VERSION} VERSION_GREATER "3.0")
set(CMAKE_CXX_STANDARD_REQUIRED "11")
# else()
# list(APPEND AMDIS_COMPILEFLAGS "-std=c++11")
endif()
# else ()
# list(APPEND AMDIS_COMPILEFLAGS "-DHAS_CXX11=0")
list(APPEND AMDIS_COMPILEFLAGS "-DHAS_CXX11=1")
if (${CMAKE_VERSION} VERSION_GREATER "3.0")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
else()
if (CMAKE_COMPILER_IS_GNUCXX)
set(GXX_MIN_VER "4.8")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS GXX_MIN_VER)
message (FATAL_ERROR "For C++11-Features the G++ Compiler must be at least version $GXX_MIN_VER")
endif ()
list(APPEND AMDIS_COMPILEFLAGS "-std=gnu++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CLANG_MIN_VER "3.0")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_MIN_VER)
message (FATAL_ERROR "For C++11-Features the Clang Compiler must be at least version $CLANG_MIN_VER")
endif ()
list(APPEND AMDIS_COMPILEFLAGS "-std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
set(INTEL_MIN_VER "12.1")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS INTEL_MIN_VER)
message (FATAL_ERROR "For C++11-Features the Intel C++ Compiler must be at least version $INTEL_MIN_VER")
endif ()
list(APPEND AMDIS_COMPILEFLAGS "-std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(MSVC_MIN_VER "12.0")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS MSVC_MIN_VER)
message (FATAL_ERROR "For C++11-Features the MSVC C++ Compiler must be at least version $MSVC_MIN_VER")
endif ()
endif ()
endif()
else ()
list(APPEND AMDIS_COMPILEFLAGS "-DHAS_CXX11=0")
endif (AMDIS_NEED_CXX11)
#load mpi-compiler for use with parmetis and parallel_domain
......@@ -135,7 +159,7 @@ if(AMDIS_HAS_PARALLEL_DOMAIN)
list(APPEND AMDIS_COMPILEFLAGS ${MPI_COMPILE_FLAGS})
list(APPEND AMDIS_INCLUDE_DIRS ${MPI_INCLUDE_PATH})
endif(MPI_FOUND)
if(AMDIS_HAS_PARALLEL_DOMAIN STREQUAL "PETSC")
if(AMDIS_HAS_PARALLEL_DOMAIN STREQUAL "PETSC")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${AMDIS_DIR})
set(PETSC_EXECUTABLE_RUNS ON)
find_package(PETSc REQUIRED)
......@@ -161,7 +185,7 @@ if(AMDIS_HAS_PARALLEL_DOMAIN)
message(FATAL_ERROR "could not find the metis libraries needed by amdis")
endif(METIS_LIB)
endif()
elseif(AMDIS_NEED_SEQ_PETSC)
find_package(MPI REQUIRED)
if(MPI_FOUND)
......@@ -169,7 +193,7 @@ elseif(AMDIS_NEED_SEQ_PETSC)
list(APPEND AMDIS_COMPILEFLAGS ${MPI_COMPILE_FLAGS})
list(APPEND AMDIS_INCLUDE_DIRS ${MPI_INCLUDE_PATH})
endif(MPI_FOUND)
set(CMAKE_MODULE_PATH ${AMDIS_DIR})
set(PETSC_EXECUTABLE_RUNS ON)
find_package(PETSc REQUIRED)
......@@ -216,7 +240,7 @@ if(AMDIS_NEED_EXTENSIONS)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions/time)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions/nanoflann)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions/pugixml)
find_library(_EXTENSIONS_LIB extensions PATHS ${AMDIS_LIBRARY_DIR} ${AMDIS_DIR}/../../lib/amdis/)
if(_EXTENSIONS_LIB)
list(APPEND AMDIS_LIBRARIES ${_EXTENSIONS_LIB})
......@@ -228,7 +252,7 @@ endif(AMDIS_NEED_EXTENSIONS)
# ----------------------------
if(AMDIS_NEED_BASE_PROBLEMS)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/base_problems)
find_library(_BASE_PROBLEMS_LIB base_problems PATHS ${AMDIS_LIBRARY_DIR} ${AMDIS_DIR}/../../lib/amdis/)
if(_BASE_PROBLEMS_LIB)
list(APPEND AMDIS_LIBRARIES ${_BASE_PROBLEMS_LIB})
......@@ -264,139 +288,152 @@ unset(_MUPARSER_LIB CACHE)
# ----------------------------
if(AMDIS_NEED_UMFPACK)
set(AMDIS_UMFPACK_PATH @UMFPACK_PATH@)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_UMFPACK_PATH})
find_library(UMFPACK_LIB umfpack
HINTS ENV LIBRARY_PATH
DOC "The UMFPACK library")
if(UMFPACK_LIB)
list(APPEND AMDIS_LIBRARIES ${UMFPACK_LIB})
else()
message(FATAL_ERROR "Could not find the UMFPACK library")
endif()
if("$ENV{BLA_VENDOR}" STREQUAL "ACML")
find_library(ACML_LIBRARY acml HINTS ENV ACML_LIB)
if(ACML_LIBRARY)
list(APPEND AMDIS_LIBRARIES ${ACML_LIBRARY}) #fortran ffio m rt) #needed for open64
else()
message(FATAL_ERROR "could not find the acml libraries, required by acml blas")
endif(ACML_LIBRARY)
else()
find_library(BLAS_LIBRARY NAMES "blas" "goto" "mkl"
HINTS ENV MKL_LIB
DOC "The BLAS library")
if(BLAS_LIBRARY)
list(APPEND AMDIS_LIBRARIES ${BLAS_LIBRARY})
list(APPEND AMDIS_LIBRARY_DIRS ${BLAS_LIBRARY_DIR})
else()
find_package(BLAS)
if(BLAS_FOUND)
list(APPEND AMDIS_LIBRARIES ${BLAS_LIBRARIES})
else()
message(STATUS "Could not find the BLAS library. Please set the variable BLAS_LIBRARY to the blas library with full path")
endif()
endif()
endif("$ENV{BLA_VENDOR}" STREQUAL "ACML")
find_library(AMD_LIB amd
HINTS ENV LIBRARY_PATH
DOC "The AMD library")
if(AMD_LIB)
list(APPEND AMDIS_LIBRARIES ${AMD_LIB})
else()
message(FATAL_ERROR "Could not find the AMD library.")
endif()
#check for if we need cholmod
set(_CHOLMOD_TEST_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/cholmodTest/)
file(WRITE ${_CHOLMOD_TEST_DIR}/CMakeLists.txt "project(cholmodTest)
cmake_minimum_required(VERSION 2.8)
include_directories(${AMDIS_INCLUDE_DIRS})
add_executable(cholmodTest cholmodTest.cpp)
target_link_libraries(cholmodTest ${AMDIS_LIBRARIES})")
file(WRITE ${_CHOLMOD_TEST_DIR}/cholmodTest.cpp "#include <stdio.h>
#include \"umfpack.h\"
int n = 5 ;
int Ap [ ] = {0, 2, 5, 9, 10, 12} ;
int Ai [ ] = { 0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4} ;
double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ;
double b [ ] = {8., 45., -3., 3., 19.} ;
if (WIN32)
set(SuiteSparse_USE_LAPACK_BLAS ON)
endif (WIN32)
find_package(SuiteSparse)
if (SuiteSparse_FOUND)
include(${USE_SuiteSparse})
list(APPEND AMDIS_LIBRARIES ${SuiteSparse_LIBRARIES})
list(APPEND AMDIS_INCLUDE_DIRS ${SuiteSparse_INCLUDE_DIR} ${SuiteSparse_METIS_INCLUDE_DIR})
message("AMDIS_INCLUDE_DIRS = ${AMDIS_INCLUDE_DIRS}")
else (SuiteSparse_FOUND)
set(AMDIS_UMFPACK_PATH @UMFPACK_PATH@)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_UMFPACK_PATH})
find_library(UMFPACK_LIB umfpack
HINTS ENV LIBRARY_PATH
DOC "The UMFPACK library")
if(UMFPACK_LIB)
list(APPEND AMDIS_LIBRARIES ${UMFPACK_LIB})
else()
message(FATAL_ERROR "Could not find the UMFPACK library")
endif()
if("$ENV{BLA_VENDOR}" STREQUAL "ACML")
find_library(ACML_LIBRARY acml HINTS ENV ACML_LIB)
if(ACML_LIBRARY)
list(APPEND AMDIS_LIBRARIES ${ACML_LIBRARY}) #fortran ffio m rt) #needed for open64
else()
message(FATAL_ERROR "could not find the acml libraries, required by acml blas")
endif(ACML_LIBRARY)
else()
find_library(BLAS_LIBRARY NAMES "blas" "goto" "mkl"
HINTS ENV MKL_LIB
DOC "The BLAS library")
if(BLAS_LIBRARY)
list(APPEND AMDIS_LIBRARIES ${BLAS_LIBRARY})
list(APPEND AMDIS_LIBRARY_DIRS ${BLAS_LIBRARY_DIR})
else()
find_package(BLAS)
if(BLAS_FOUND)
list(APPEND AMDIS_LIBRARIES ${BLAS_LIBRARIES})
else()
message(STATUS "Could not find the BLAS library. Please set the variable BLAS_LIBRARY to the blas library with full path")
endif()
endif()
endif("$ENV{BLA_VENDOR}" STREQUAL "ACML")
find_library(AMD_LIB amd
HINTS ENV LIBRARY_PATH
DOC "The AMD library")
if(AMD_LIB)
list(APPEND AMDIS_LIBRARIES ${AMD_LIB})
else()
message(FATAL_ERROR "Could not find the AMD library.")
endif()
#check for if we need cholmod
set(_CHOLMOD_TEST_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/cholmodTest/)
file(WRITE ${_CHOLMOD_TEST_DIR}/CMakeLists.txt "project(cholmodTest)
cmake_minimum_required(VERSION 2.8)
include_directories(${AMDIS_INCLUDE_DIRS})
add_executable(cholmodTest cholmodTest.cpp)
target_link_libraries(cholmodTest ${AMDIS_LIBRARIES})")
file(WRITE ${_CHOLMOD_TEST_DIR}/cholmodTest.cpp "#include <stdio.h>
#include \"umfpack.h\"
int n = 5 ;
int Ap [ ] = {0, 2, 5, 9, 10, 12} ;
int Ai [ ] = { 0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4} ;
double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ;
double b [ ] = {8., 45., -3., 3., 19.} ;
double x [5] ;
int main (void)
{
double *null = (double *) NULL ;
int i ;
void *Symbolic, *Numeric ;
double stats [2];
umfpack_tic (stats);
(void) umfpack_di_symbolic (n, n, Ap, Ai, Ax, &Symbolic, null, null) ;
(void) umfpack_di_numeric (Ap, Ai, Ax, Symbolic, &Numeric, null, null) ;
umfpack_di_free_symbolic (&Symbolic) ;
(void) umfpack_di_solve (UMFPACK_A, Ap, Ai, Ax, x, b, Numeric, null, null) ;
umfpack_di_free_numeric (&Numeric) ;
umfpack_toc (stats);
return (0) ;
}")
# "#include <umfpack.h>
# int main(int , char* argv[]) { double c[UMFPACK_CONTROL]; umfpack_dl_defaults(c); return 0;}")
try_compile(CHOLMOD_TEST ${_CHOLMOD_TEST_DIR}/build ${_CHOLMOD_TEST_DIR} cholmodTest
OUTPUT_VARIABLE CHOLMOD_OUT)
if(NOT CHOLMOD_TEST)
file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "cholmodTest-output: \n ${CHOLMOD_OUT}")
find_library(CHOLMOD_LIB cholmod)
find_library(COLAMD_LIB colamd)
if(CHOLMOD_LIB)
list(APPEND AMDIS_LIBRARIES ${CHOLMOD_LIB})
else()
message(FATAL_ERROR "your umfpack seems to need cholmod, but cmake could not find it")
endif()
if(COLAMD_LIB)
list(APPEND AMDIS_LIBRARIES ${COLAMD_LIB})
else()
message(FATAL_ERROR "your umfpack seems to need colamd, but cmake could not find it")
endif()
#test with cholmod and colamd..
file(WRITE ${_CHOLMOD_TEST_DIR}/CMakeLists.txt "project(cholmodTest)
cmake_minimum_required(VERSION 2.8)
include_directories(${AMDIS_INCLUDE_DIRS})
add_executable(cholmodTest cholmodTest.cpp)
target_link_libraries(cholmodTest ${AMDIS_LIBRARIES})")
try_compile(CHOLMOD_TEST2 ${_CHOLMOD_TEST_DIR}/build ${_CHOLMOD_TEST_DIR} cholmodTest
OUTPUT_VARIABLE CHOLMOD_OUT)
if(NOT CHOLMOD_TEST2)
file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "cholmodTest2-output: \n ${CHOLMOD_OUT}")
find_library(SUITESPARSECONFIG_LIB suitesparseconfig)
if(SUITESPARSECONFIG_LIB)
list(APPEND AMDIS_LIBRARIES ${SUITESPARSECONFIG_LIB})
else()
message(STATUS "your umfpack seems to need suitesparseconfig, but cmake could not find it")
endif()
endif()
double x [5] ;
int main (void)
{
double *null = (double *) NULL ;
int i ;
void *Symbolic, *Numeric ;
double stats [2];
umfpack_tic (stats);
(void) umfpack_di_symbolic (n, n, Ap, Ai, Ax, &Symbolic, null, null) ;
(void) umfpack_di_numeric (Ap, Ai, Ax, Symbolic, &Numeric, null, null) ;
umfpack_di_free_symbolic (&Symbolic) ;
(void) umfpack_di_solve (UMFPACK_A, Ap, Ai, Ax, x, b, Numeric, null, null) ;
umfpack_di_free_numeric (&Numeric) ;
umfpack_toc (stats);
return (0) ;
}")
# "#include <umfpack.h>
# int main(int , char* argv[]) { double c[UMFPACK_CONTROL]; umfpack_dl_defaults(c); return 0;}")
try_compile(CHOLMOD_TEST ${_CHOLMOD_TEST_DIR}/build ${_CHOLMOD_TEST_DIR} cholmodTest
OUTPUT_VARIABLE CHOLMOD_OUT)
if(NOT CHOLMOD_TEST)
file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "cholmodTest-output: \n ${CHOLMOD_OUT}")
find_library(CHOLMOD_LIB cholmod)
find_library(COLAMD_LIB colamd)
if(CHOLMOD_LIB)
list(APPEND AMDIS_LIBRARIES ${CHOLMOD_LIB})
else()
message(FATAL_ERROR "your umfpack seems to need cholmod, but cmake could not find it")
endif()
if(COLAMD_LIB)
list(APPEND AMDIS_LIBRARIES ${COLAMD_LIB})
else()
message(FATAL_ERROR "your umfpack seems to need colamd, but cmake could not find it")
endif()
#test with cholmod and colamd..
file(WRITE ${_CHOLMOD_TEST_DIR}/CMakeLists.txt "project(cholmodTest)
cmake_minimum_required(VERSION 2.8)
include_directories(${AMDIS_INCLUDE_DIRS})
add_executable(cholmodTest cholmodTest.cpp)
target_link_libraries(cholmodTest ${AMDIS_LIBRARIES})")
try_compile(CHOLMOD_TEST2 ${_CHOLMOD_TEST_DIR}/build ${_CHOLMOD_TEST_DIR} cholmodTest
OUTPUT_VARIABLE CHOLMOD_OUT)
if(NOT CHOLMOD_TEST2)
file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "cholmodTest2-output: \n ${CHOLMOD_OUT}")
find_library(SUITESPARSECONFIG_LIB suitesparseconfig)
if(SUITESPARSECONFIG_LIB)
list(APPEND AMDIS_LIBRARIES ${SUITESPARSECONFIG_LIB})
else()
message(STATUS "your umfpack seems to need suitesparseconfig, but cmake could not find it")
endif()
endif()
endif()
endif()
endif ()
endif(AMDIS_NEED_UMFPACK)
# PNG library
......@@ -431,12 +468,12 @@ endif(AMDIS_NEED_BDDCML)
# Zoltan library
# --------------
if(AMDIS_NEED_ZOLTAN)
find_library(ZOLTAN_LIB zoltan
find_library(ZOLTAN_LIB zoltan
HINTS ENV LIBRARY_PATH
DOC "full path to the zoltan library")
DOC "full path to the zoltan library")
if(ZOLTAN_LIB)
list(APPEND AMDIS_LIBRARIES ${ZOLTAN_LIB})
list(APPEND AMDIS_LIBRARIES ${ZOLTAN_LIB})
else()
message(FATAL_ERROR "Could not find zoltan library!")
endif()
......
if (ENABLE_BDDCML)
SET(BDDCML_LINK_LIST "" CACHE STRING "Further libraries to be linked with BDDCML")
find_file(BDDCML_H bddcml_interface_c.h
HINTS ENV CPATH
DOC "Header bddcml_interface_c.h for the BDDCML library.")
if(BDDCML_H)
get_filename_component(BDDCML_PATH ${BDDCML_H} PATH)
include_directories(${BDDCML_PATH})
list(APPEND COMPILEFLAGS "-DHAVE_BDDC_ML=1")
list(APPEND COMPILEFLAGS "-DAdd_")
else()
message(FATAL_ERROR "Could not find BDDCML headers.")
endif()
find_library(BDDCML_LIB bddcml
HINTS ENV LIBRARY_PATH
DOC "BDDCML library")
if(BDDCML_LIB)
list(APPEND AMDIS_LIBS ${BDDCML_LIB})
else()
message(FATAL_ERROR "Could not find the BDDCML library")
endif()
find_file(BLOPEX_PATH blopex
HINTS ENV CPATH
DOC "Path to BLOPEX library.")
endif (ENABLE_BDDCML)
# enable the c++11 features. From cmake version 3.0 this is simply done by setting
# the cxx_standard variables. For older cmake version the compile-flags must be added manually.
if (ENABLE_CXX11)
list(APPEND COMPILEFLAGS "-DHAS_CXX11=1")
if (${CMAKE_VERSION} VERSION_GREATER "3.0")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
else()
if (CMAKE_COMPILER_IS_GNUCXX)
set(GXX_MIN_VER "4.8")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS GXX_MIN_VER)
message (FATAL_ERROR "For C++11-Features the G++ Compiler must be at least version $GXX_MIN_VER")
endif ()
list(APPEND COMPILEFLAGS "-std=gnu++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CLANG_MIN_VER "3.0")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_MIN_VER)
message (FATAL_ERROR "For C++11-Features the Clang Compiler must be at least version $CLANG_MIN_VER")
endif ()
list(APPEND COMPILEFLAGS "-std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
set(INTEL_MIN_VER "12.1")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS INTEL_MIN_VER)
message (FATAL_ERROR "For C++11-Features the Intel C++ Compiler must be at least version $INTEL_MIN_VER")
endif ()
list(APPEND COMPILEFLAGS "-std=c++11")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(MSVC_MIN_VER "12.0")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS MSVC_MIN_VER)
message (FATAL_ERROR "For C++11-Features the MSVC C++ Compiler must be at least version $MSVC_MIN_VER")
endif ()
endif ()
endif()
else ()
list(APPEND COMPILEFLAGS "-DHAS_CXX11=0")
endif (ENABLE_CXX11)
if (ENABLE_EXTENSIONS)
option(ENABLE_BASE_PROBLEMS "Use base_problems" true)
find_path(EXTENSIONS_DIR NAMES Helpers.h
HINTS ${CMAKE_CURRENT_SOURCE_DIR}/../extensions
DOC "Path to AMDiS extensions.")
if (EXTENSIONS_DIR)
if (NOT EXISTS ${EXTENSIONS_DIR}/Helpers.h OR NOT EXISTS ${EXTENSIONS_DIR}/base_problems/BaseProblem.h)
message(FATAL_ERROR "Wrong extensions directory! Directory must contain the 'Helpers.h' and the subdirectory 'base_problems'")
else()
SET(EXTENSIONS_SRC
${EXTENSIONS_DIR}/Helpers.cc
${EXTENSIONS_DIR}/BackgroundMesh.cc
${EXTENSIONS_DIR}/GeometryTools.cc
${EXTENSIONS_DIR}/POperators.cc
${EXTENSIONS_DIR}/SingularDirichletBC2.cc
${EXTENSIONS_DIR}/time/ExtendedRosenbrockStationary.cc
${EXTENSIONS_DIR}/pugixml/src/pugixml.cpp)
if(ENABLE_SEQ_PETSC)
list(APPEND EXTENSIONS_SRC
${EXTENSIONS_DIR}/preconditioner/PetscPreconPfc.cc
${EXTENSIONS_DIR}/preconditioner/PetscPreconPfcDiag.cc
${EXTENSIONS_DIR}/preconditioner/PetscPreconCahnHilliard.cc)
endif(ENABLE_SEQ_PETSC)
if(ENABLE_PARALLEL_DOMAIN)
list(APPEND EXTENSIONS_SRC
# ${EXTENSIONS_DIR}/preconditioner/PetscSolverNavierStokes2.cc
${EXTENSIONS_DIR}/preconditioner/PetscSolverPfc.cc
${EXTENSIONS_DIR}/preconditioner/PetscSolverPfc_diag.cc)
endif(ENABLE_PARALLEL_DOMAIN)
list(APPEND COMPILEFLAGS "-DHAVE_EXTENSIONS=1")
list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR})
list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR}/time)
list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR}/nanoflann)
list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR}/pugixml/src)
if(WIN32)
add_library(extensions STATIC ${EXTENSIONS_SRC})
else()
add_library(extensions SHARED ${EXTENSIONS_SRC})
endif()
list(APPEND AMDIS_LIBS extensions)
FILE(GLOB HEADERS "${EXTENSIONS_DIR}/*.h")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/extensions/)
FILE(GLOB HEADERS "${EXTENSIONS_DIR}/*.hh")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/extensions/)
list(APPEND deb_add_dirs "include/amdis/extensions")
FILE(GLOB HEADERS "${EXTENSIONS_DIR}/time/*.h")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/extensions/time/)
FILE(GLOB HEADERS "${EXTENSIONS_DIR}/time/*.hh")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/extensions/time/)
FILE(GLOB HEADERS "${EXTENSIONS_DIR}/preconditioner/*.h")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/extensions/preconditioner/)
FILE(GLOB HEADERS "${EXTENSIONS_DIR}/preconditioner/*.hh")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/extensions/preconditioner/)
list(APPEND deb_add_dirs "include/amdis/extensions/time")
FILE(GLOB HEADERS "${EXTENSIONS_DIR}/nanoflann/*.hpp")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/extensions/nanoflann/)
list(APPEND deb_add_dirs "include/amdis/extensions/nanoflann")
FILE(GLOB HEADERS "${EXTENSIONS_DIR}/pugixml/src/*.hpp")
INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/extensions/pugixml/)
list(APPEND deb_add_dirs "include/amdis/extensions/pugixml")
install(TARGETS extensions
DESTINATION lib/amdis/ )
# === baseProblems ====================================================================
if(ENABLE_BASE_PROBLEMS)
SET(BASE_PROBLEMS_SRC
${EXTENSIONS_DIR}/base_problems/CahnHilliard.cc
${EXTENSIONS_DIR}/base_problems/CahnHilliard_RB.cc
${EXTENSIONS_DIR}/base_problems/CahnHilliardNavierStokes.cc
${EXTENSIONS_DIR}/base_problems/CahnHilliardNavierStokes_RB.cc
${EXTENSIONS_DIR}/base_problems/CahnHilliardNavierStokes_TwoPhase.cc
${EXTENSIONS_DIR}/base_problems/CahnHilliardNavierStokes_TwoPhase_RB.cc
${EXTENSIONS_DIR}/base_problems/DiffuseDomainFsi.cc
${EXTENSIONS_DIR}/base_problems/LinearElasticity.cc
${EXTENSIONS_DIR}/base_problems/LinearElasticityPhase.cc
# ${EXTENSIONS_DIR}/base_problems/NavierStokes_Chorin.cc
${EXTENSIONS_DIR}/base_problems/NavierStokesCahnHilliard.cc
# ${EXTENSIONS_DIR}/base_problems/NavierStokesPhase_Chorin.cc
${EXTENSIONS_DIR}/base_problems/NavierStokesPhase_TaylorHood.cc
${EXTENSIONS_DIR}/base_problems/NavierStokes_TaylorHood.cc
${EXTENSIONS_DIR}/base_problems/NavierStokes_TaylorHood_RB.cc
${EXTENSIONS_DIR}/base_problems/NavierStokes_TH_MultiPhase.cc
${EXTENSIONS_DIR}/base_problems/NavierStokes_TH_MultiPhase_RB.cc
${EXTENSIONS_DIR}/base_problems/PhaseFieldCrystal.cc
${EXTENSIONS_DIR}/base_problems/PhaseFieldCrystal_Phase.cc
${EXTENSIONS_DIR}/base_problems/PhaseFieldCrystal_RB.cc
${EXTENSIONS_DIR}/base_problems/PolarizationField.cc
${EXTENSIONS_DIR}/base_problems/QuasiCrystal.cc
${EXTENSIONS_DIR}/base_problems/QuasiCrystal_RB.cc
# ${EXTENSIONS_DIR}/base_problems/VacancyPhaseFieldCrystal.cc
)
list(APPEND COMPILEFLAGS "-DHAVE_BASE_PROBLEMS=1")
list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR}/base_problems)
if(WIN32)
add_library(base_problems STATIC ${BASE_PROBLEMS_SRC})
else()
add_library(base_problems SHARED ${BASE_PROBLEMS_SRC})
endif()
list(APPEND AMDIS_LIBS base_problems)
FILE(GLOB HEADERS "${EXTENSIONS_DIR}/base_problems/*.h")