Commit 65132ec8 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

resolved some extensions errors and adapted test CMakeLists

parent 9b8b6cf1
Pipeline #1742 failed with stages
in 26 minutes and 30 seconds
...@@ -47,7 +47,7 @@ cmake_dependent_option(ENABLE_ZOLTAN ...@@ -47,7 +47,7 @@ cmake_dependent_option(ENABLE_ZOLTAN
"ENABLE_PARALLEL_DOMAIN" false) "ENABLE_PARALLEL_DOMAIN" false)
cmake_dependent_option(ENABLE_PARALLEL_SOLVERS cmake_dependent_option(ENABLE_PARALLEL_SOLVERS
"Add some problem dependent solver, e.g. Feti, Navier-Stokes and Cahn-Hilliard" true "Add some problem dependent solvers, e.g. Feti, Navier-Stokes and Cahn-Hilliard" true
"ENABLE_PARALLEL_DOMAIN" false) "ENABLE_PARALLEL_DOMAIN" false)
cmake_dependent_option(ENABLE_BDDCML cmake_dependent_option(ENABLE_BDDCML
...@@ -55,13 +55,6 @@ cmake_dependent_option(ENABLE_BDDCML ...@@ -55,13 +55,6 @@ cmake_dependent_option(ENABLE_BDDCML
"ENABLE_PARALLEL_DOMAIN" false) "ENABLE_PARALLEL_DOMAIN" false)
# } # }
# additional options for Extensions
# {
cmake_dependent_option(ENABLE_BASE_PROBLEMS
"Use base_problems" true
"ENABLE_EXTENSIONS" false)
# }
# enable/disable some more features # enable/disable some more features
option(ENABLE_COMPRESSION "Use output compression for vtu and arh files" true) option(ENABLE_COMPRESSION "Use output compression for vtu and arh files" true)
mark_as_advanced(ENABLE_COMPRESSION) mark_as_advanced(ENABLE_COMPRESSION)
......
...@@ -40,8 +40,8 @@ find_package_handle_standard_args(BDDCML ...@@ -40,8 +40,8 @@ find_package_handle_standard_args(BDDCML
REQUIRED_VARS BDDCML_LIBRARY BDDCML_HEADER REQUIRED_VARS BDDCML_LIBRARY BDDCML_HEADER
) )
if(BDDCML_FOUND AND MPI_FOUND AND NOT TARGET BDDCML::BDDCML) if(BDDCML_FOUND AND NOT TARGET BDDCML::BDDCML)
add_library(BDDCML::BDDCML INTERFACE IMPORTED) add_library(BDDCML::BDDCML INTERFACE IMPORTED GLOBAL)
get_filename_component(BDDCML_INCLUDE_DIR ${BDDCML_HEADER} PATH) get_filename_component(BDDCML_INCLUDE_DIR ${BDDCML_HEADER} PATH)
......
...@@ -52,7 +52,7 @@ find_package_handle_standard_args(HYPRE ...@@ -52,7 +52,7 @@ find_package_handle_standard_args(HYPRE
) )
if(HYPRE_FOUND AND MPI_FOUND AND NOT TARGET HYPRE::HYPRE) if(HYPRE_FOUND AND MPI_FOUND AND NOT TARGET HYPRE::HYPRE)
add_library(HYPRE::HYPRE INTERFACE IMPORTED) add_library(HYPRE::HYPRE INTERFACE IMPORTED GLOBAL)
get_filename_component(HYPRE_LIB_DIR ${HYPRE_LIBRARY} 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}) file(GLOB HYPRE_LIBS ${HYPRE_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}HYPRE*${CMAKE_SHARED_LIBRARY_SUFFIX})
......
...@@ -33,27 +33,27 @@ find_path(PETSC_PKG_CONFIG "PETSc.pc" ...@@ -33,27 +33,27 @@ find_path(PETSC_PKG_CONFIG "PETSc.pc"
if (PETSC_PKG_CONFIG) if (PETSC_PKG_CONFIG)
set(ENV{PKG_CONFIG_PATH} "${PETSC_PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}") set(ENV{PKG_CONFIG_PATH} "${PETSC_PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}")
if (PETSc_FIND_VERSION)
pkg_check_modules(PETSC QUIET PETSc>=${PETSc_FIND_VERSION} IMPORTED_TARGET)
else ()
pkg_check_modules(PETSC QUIET PETSc IMPORTED_TARGET)
endif ()
if (PETSC_STATIC_FOUND)
set(PETSc_VERSION ${PETSC_STATIC_VERSION})
elseif (PETSC_FOUND)
set(PETSc_VERSION ${PETSC_VERSION})
endif ()
if ((PETSC_STATIC_FOUND OR PETSC_FOUND) AND NOT TARGET PETSc::PETSc)
add_library(PETSc::PETSc INTERFACE IMPORTED)
target_link_libraries(PETSc::PETSc INTERFACE PkgConfig::PETSC)
endif()
endif (PETSC_PKG_CONFIG) endif (PETSC_PKG_CONFIG)
if (PETSc_FIND_VERSION)
pkg_check_modules(PETSC QUIET PETSc>=${PETSc_FIND_VERSION} IMPORTED_TARGET)
else ()
pkg_check_modules(PETSC QUIET PETSc IMPORTED_TARGET)
endif ()
if (PETSC_STATIC_FOUND)
set(PETSc_VERSION ${PETSC_STATIC_VERSION})
elseif (PETSC_FOUND)
set(PETSc_VERSION ${PETSC_VERSION})
endif ()
if ((PETSC_STATIC_FOUND OR PETSC_FOUND) AND NOT TARGET PETSc::PETSc)
add_library(PETSc::PETSc INTERFACE IMPORTED GLOBAL)
target_link_libraries(PETSc::PETSc INTERFACE PkgConfig::PETSC)
endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PETSc find_package_handle_standard_args(PETSc
REQUIRED_VARS PETSC_PKG_CONFIG REQUIRED_VARS PETSc_VERSION
VERSION_VAR PETSc_VERSION VERSION_VAR PETSc_VERSION
) )
...@@ -20,15 +20,10 @@ macro(target_enable_cxx14 RESULT_VAR _TARGET_ _SCOPE_) ...@@ -20,15 +20,10 @@ macro(target_enable_cxx14 RESULT_VAR _TARGET_ _SCOPE_)
if (COMPILER_SUPPORTS_CXX14_FLAG AND CXX14_COMPILES_WITH_CXX14_FLAG) if (COMPILER_SUPPORTS_CXX14_FLAG AND CXX14_COMPILES_WITH_CXX14_FLAG)
target_compile_options(${_TARGET_} ${_SCOPE_} "-std=c++14") target_compile_options(${_TARGET_} ${_SCOPE_} "-std=c++14")
set(${RESULT_VAR} true CACHE BOOL "Enable C++14 compiler features" FORCE) set(${RESULT_VAR} TRUE)
else () else ()
check_cxx_source_compiles("${CXX14_CODE}" CXX14_COMPILES) check_cxx_source_compiles("${CXX14_CODE}" CXX14_COMPILES)
set(${RESULT_VAR} ${CXX14_COMPILES})
if (CXX14_COMPILES)
set(${RESULT_VAR} true CACHE BOOL "Enable C++14 compiler features" FORCE)
else ()
set(${RESULT_VAR} false CACHE BOOL "Enable C++14 compiler features" FORCE)
endif ()
endif () endif ()
endmacro(target_enable_cxx14) endmacro(target_enable_cxx14)
...@@ -52,14 +47,23 @@ macro(target_enable_cxx11 RESULT_VAR _TARGET_ _SCOPE_) ...@@ -52,14 +47,23 @@ macro(target_enable_cxx11 RESULT_VAR _TARGET_ _SCOPE_)
if (COMPILER_SUPPORTS_CXX11_FLAG AND CXX11_COMPILES_WITH_CXX11_FLAG) if (COMPILER_SUPPORTS_CXX11_FLAG AND CXX11_COMPILES_WITH_CXX11_FLAG)
target_compile_options(${_TARGET_} ${_SCOPE_} "-std=c++11") target_compile_options(${_TARGET_} ${_SCOPE_} "-std=c++11")
set(${RESULT_VAR} true CACHE BOOL "Enable C++11 compiler features" FORCE) set(${RESULT_VAR} TRUE)
else () else ()
check_cxx_source_compiles("${CXX11_CODE}" CXX11_COMPILES) check_cxx_source_compiles("${CXX11_CODE}" CXX11_COMPILES)
set(${RESULT_VAR} ${CXX11_COMPILES})
if (CXX11_COMPILES)
set(${RESULT_VAR} true CACHE BOOL "Enable C++11 compiler features" FORCE)
else ()
set(${RESULT_VAR} false CACHE BOOL "Enable C++11 compiler features" FORCE)
endif ()
endif () endif ()
endmacro(target_enable_cxx11) endmacro(target_enable_cxx11)
macro(target_set_cxx_standard _TARGET_ _SCOPE_)
target_enable_cxx14(SUPPORTS_CXX14 ${_TARGET_} ${_SCOPE_})
if (SUPPORTS_CXX14)
target_compile_definitions(${_TARGET_} ${_SCOPE_} "AMDIS_HAS_CXX14=1")
else ()
target_enable_cxx11(SUPPORTS_CXX11 ${_TARGET_} ${_SCOPE_})
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(${_TARGET_} ${_SCOPE_} "AMDIS_HAS_CXX11=1")
endmacro(target_set_cxx_standard)
add_subdirectory(mtl4) add_subdirectory(mtl4)
add_subdirectory(muparser_v134) add_subdirectory(muparser_v134)
add_subdirectory(nanoflann)
if (ENABLE_EXTENSIONS) add_subdirectory(pugixml)
add_subdirectory(nanoflann) \ No newline at end of file
add_subdirectory(pugixml)
endif (ENABLE_EXTENSIONS)
\ No newline at end of file
...@@ -6,7 +6,7 @@ include(CMakePackageConfigHelpers) ...@@ -6,7 +6,7 @@ include(CMakePackageConfigHelpers)
include(target_enable_cxx11) include(target_enable_cxx11)
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel" FORCE) "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel" FORCE)
endif(NOT CMAKE_BUILD_TYPE) endif(NOT CMAKE_BUILD_TYPE)
...@@ -14,8 +14,8 @@ endif(NOT CMAKE_BUILD_TYPE) ...@@ -14,8 +14,8 @@ endif(NOT CMAKE_BUILD_TYPE)
set(MUPARSER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src) set(MUPARSER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(MUPARSER_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) set(MUPARSER_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
file(GLOB MUPARSER_HEADERS "${MUPARSER_SOURCE_DIR}/*.cpp") file(GLOB MUPARSER_SOURCES "${MUPARSER_SOURCE_DIR}/*.cpp")
file(GLOB MUPARSER_SOURCES "${MUPARSER_INCLUDE_DIR}/*.h") file(GLOB MUPARSER_HEADERS "${MUPARSER_INCLUDE_DIR}/*.h")
add_library(MuParser add_library(MuParser
${MUPARSER_HEADERS} ${MUPARSER_HEADERS}
${MUPARSER_SOURCES} ${MUPARSER_SOURCES}
...@@ -28,10 +28,8 @@ target_include_directories(MuParser ...@@ -28,10 +28,8 @@ target_include_directories(MuParser
$<BUILD_INTERFACE:${MUPARSER_INCLUDE_DIR}> $<BUILD_INTERFACE:${MUPARSER_INCLUDE_DIR}>
) )
#set_property(TARGET muparser PROPERTY POSITION_INDEPENDENT_CODE ON) #set_property(TARGET MuParser PROPERTY POSITION_INDEPENDENT_CODE ON)
target_set_cxx_standard(MuParser PRIVATE)
target_enable_cxx11(MUPARSER_ENABLE_CXX11 MuParser PRIVATE)
target_compile_definitions(MuParser PRIVATE AMDIS_HAS_CXX11=1)
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/MuParserConfig.cmake.in configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/MuParserConfig.cmake.in
${PROJECT_BINARY_DIR}/MuParserConfig.cmake ${PROJECT_BINARY_DIR}/MuParserConfig.cmake
......
...@@ -43,7 +43,9 @@ namespace mu ...@@ -43,7 +43,9 @@ namespace mu
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
ParserErrorMsg::~ParserErrorMsg() ParserErrorMsg::~ParserErrorMsg()
{} {
std::cout << "Destructor" << std::endl;
}
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
/** \brief Assignement operator is deactivated. /** \brief Assignement operator is deactivated.
......
...@@ -251,18 +251,7 @@ set_target_properties(AMDiS${POSTFIX} ...@@ -251,18 +251,7 @@ set_target_properties(AMDiS${POSTFIX}
# set compiler standard # set compiler standard
# --------------------- # ---------------------
target_set_cxx_standard(AMDiS${POSTFIX} PUBLIC)
target_enable_cxx14(SUPPORTS_CXX14 AMDiS${POSTFIX} PUBLIC)
if (SUPPORTS_CXX14)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "AMDIS_HAS_CXX14=1")
else ()
target_enable_cxx11(SUPPORTS_CXX11 AMDiS${POSTFIX} PUBLIC)
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} PUBLIC "AMDIS_HAS_CXX11=1")
# configure external packages # configure external packages
# --------------------------- # ---------------------------
...@@ -293,53 +282,69 @@ target_link_libraries(AMDiS${POSTFIX} MuParser::MuParser) ...@@ -293,53 +282,69 @@ target_link_libraries(AMDiS${POSTFIX} MuParser::MuParser)
if (ENABLE_PNG) if (ENABLE_PNG)
find_package(PNG REQUIRED) find_package(PNG REQUIRED)
target_link_libraries(AMDiS${POSTFIX} PNG::PNG) if (PNG_FOUND)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_PNG=1") target_link_libraries(AMDiS${POSTFIX} PNG::PNG)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_PNG=1")
endif (PNG_FOUND)
endif (ENABLE_PNG) endif (ENABLE_PNG)
if (ENABLE_MPI OR ENABLE_PARALLEL_DOMAIN) if (ENABLE_MPI OR ENABLE_PARALLEL_DOMAIN)
find_package(MPI REQUIRED MPICXX) find_package(MPI REQUIRED MPICXX)
target_link_libraries(AMDiS${POSTFIX} MPI::MPI_CXX) if (MPI_FOUND)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_MPI=1") target_link_libraries(AMDiS${POSTFIX} MPI::MPI_CXX)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_MPI=1")
endif (MPI_FOUND)
endif () endif ()
if (ENABLE_COMPRESSION) if (ENABLE_COMPRESSION)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "AMDIS_HAS_COMPRESSION=1") target_compile_definitions(AMDiS${POSTFIX} PUBLIC "AMDIS_HAS_COMPRESSION=1")
endif (ENABLE_COMPRESSION) endif (ENABLE_COMPRESSION)
if (ENABLE_UMFPACK)
find_package(UMFPACK 4.5 REQUIRED)
target_link_libraries(AMDiS${POSTFIX} UMFPACK::UMFPACK)
endif (ENABLE_UMFPACK)
if (ENABLE_HYPRE)
find_package(HYPRE REQUIRED)
target_link_libraries(AMDiS${POSTFIX} HYPRE::HYPRE)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "MTL_HAS_HYPRE=1;HAVE_HYPRE=1")
endif (ENABLE_HYPRE)
if (ENABLE_SEQ_PETSC OR ENABLE_PARALLEL_DOMAIN) if (ENABLE_SEQ_PETSC OR ENABLE_PARALLEL_DOMAIN)
find_package(PETSc 3.3 REQUIRED) find_package(PETSc 3.3 REQUIRED)
target_link_libraries(AMDiS${POSTFIX} PETSc::PETSc) if (PETSc_FOUND)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "PETSC_VERSION=${PETSc_VERSION}") target_link_libraries(AMDiS${POSTFIX} PETSc::PETSc)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "PETSC_VERSION=${PETSc_VERSION}")
endif (PETSc_FOUND)
endif () endif ()
if (ENABLE_PARALLEL_DOMAIN) if (ENABLE_PARALLEL_DOMAIN)
find_package(ParMETIS 4.0 REQUIRED) find_package(ParMETIS 4.0 REQUIRED)
target_link_libraries(AMDiS${POSTFIX} ParMETIS::ParMETIS) if (ParMETIS_FOUND)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_PARALLEL_DOMAIN_AMDIS=1;HAVE_PARALLEL_PETSC=1") target_link_libraries(AMDiS${POSTFIX} ParMETIS::ParMETIS)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_PARALLEL_DOMAIN_AMDIS=1;HAVE_PARALLEL_PETSC=1")
endif (ParMETIS_FOUND)
endif (ENABLE_PARALLEL_DOMAIN) endif (ENABLE_PARALLEL_DOMAIN)
if (ENABLE_UMFPACK)
find_package(UMFPACK 4.5 REQUIRED)
if (UMFPACK_FOUND)
target_link_libraries(AMDiS${POSTFIX} UMFPACK::UMFPACK)
endif (UMFPACK_FOUND)
endif (ENABLE_UMFPACK)
if (ENABLE_HYPRE)
find_package(HYPRE REQUIRED)
if (HYPRE_FOUND)
target_link_libraries(AMDiS${POSTFIX} HYPRE::HYPRE)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "MTL_HAS_HYPRE=1;HAVE_HYPRE=1")
endif (HYPRE_FOUND)
endif (ENABLE_HYPRE)
if (ENABLE_BDDCML) if (ENABLE_BDDCML)
find_package(BDDCML REQUIRED) find_package(BDDCML REQUIRED)
target_link_libraries(AMDiS${POSTFIX} BDDCML::BDDCML) if (BDDCML_FOUND)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_BDDCML=1") target_link_libraries(AMDiS${POSTFIX} BDDCML::BDDCML)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_BDDCML=1")
endif (BDDCML_FOUND)
endif (ENABLE_BDDCML) endif (ENABLE_BDDCML)
if (ENABLE_ZOLTAN) if (ENABLE_ZOLTAN)
find_package(ZOLTAN REQUIRED) find_package(ZOLTAN REQUIRED)
target_link_libraries(AMDiS${POSTFIX} ZOLTAN::ZOLTAN) if (ZOLTAN_FOUND)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_ZOLTAN=1") target_link_libraries(AMDiS${POSTFIX} ZOLTAN::ZOLTAN)
target_compile_definitions(AMDiS${POSTFIX} PUBLIC "HAVE_ZOLTAN=1")
endif (ZOLTAN_FOUND)
endif (ENABLE_ZOLTAN) endif (ENABLE_ZOLTAN)
if (ENABLE_EXTENSIONS) if (ENABLE_EXTENSIONS)
......
...@@ -110,9 +110,10 @@ namespace AMDiS ...@@ -110,9 +110,10 @@ namespace AMDiS
} }
#else #else
using MatSolverPackage_t = MatSolverPackage; using MatSolverPackage_t = MatSolverPackage;
inline PetscErrorCode pc_factor_set_mat_solver_package(PC pc, MatSolverPackage stype) template <class MSP>
inline PetscErrorCode pc_factor_set_mat_solver_package(PC pc, MSP&& stype)
{ {
return PCFactorSetMatSolverPackage(pc, stype); return PCFactorSetMatSolverPackage(pc, std::forward<MSP>(stype));
} }
#endif #endif
......
unset(ENV{LIBRARY_PATH})
project("AMDiS test suite") project("AMDiS test suite")
cmake_minimum_required(VERSION 2.8.10) cmake_minimum_required(VERSION 3.5)
find_package(AMDIS REQUIRED ${COMPONENT}) find_package(AMDiS REQUIRED ${COMPONENT})
include_directories(${AMDIS_INCLUDE_DIRS})
add_definitions(${AMDIS_COMPILEFLAGS})
enable_testing() enable_testing()
...@@ -14,9 +12,5 @@ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) ...@@ -14,9 +12,5 @@ add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
# Add the unit_test_framework for some tests # Add the unit_test_framework for some tests
find_package(Boost REQUIRED unit_test_framework) find_package(Boost REQUIRED unit_test_framework)
if (AMDIS_HAS_PARALLEL_DOMAIN) add_subdirectory(seq)
# add_subdirectory(mpi)
else ()
add_subdirectory(seq)
endif (AMDIS_HAS_PARALLEL_DOMAIN)
add_subdirectory(other) add_subdirectory(other)
...@@ -5,7 +5,7 @@ foreach(s ${sources}) ...@@ -5,7 +5,7 @@ foreach(s ${sources})
get_filename_component(swe ${s} NAME_WE) get_filename_component(swe ${s} NAME_WE)
add_executable(${swe}_mpi ${s}) add_executable(${swe}_mpi ${s})
target_link_libraries(${swe}_mpi ${AMDIS_LIBRARIES} ${Boost_LIBRARIES}) target_link_libraries(${swe}_mpi AMDiS::AMDiS-p Boost::unit_test_framework)
list(APPEND TEST_DEPENDENCIES ${swe}_mpi) list(APPEND TEST_DEPENDENCIES ${swe}_mpi)
endforeach(s) endforeach(s)
......
set(TEST_DEPENDENCIES "") set(TEST_DEPENDENCIES "")
if (AMDIS_HAS_PARALLEL_DOMAIN) if (ENABLE_PARALLEL_DOMAIN)
list(APPEND RUN_PARALLEL "mpirun" "-np" "2") list(APPEND RUN_PARALLEL "mpirun" "-np" "2")
else () else ()
set(RUN_PARALLEL "") set(RUN_PARALLEL "")
...@@ -8,8 +8,8 @@ endif () ...@@ -8,8 +8,8 @@ endif ()
add_executable(test_expr src/Test_Expressions.cc) add_executable(test_expr src/Test_Expressions.cc)
target_link_libraries(test_expr ${AMDIS_LIBRARIES}) target_link_libraries(test_expr AMDiS)
if (NOT AMDIS_HAS_PARALLEL_DOMAIN) if (NOT ENABLE_PARALLEL_DOMAIN)
add_test(NAME RunTestExpr_1d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_expr init/test_expr.dat.1d) add_test(NAME RunTestExpr_1d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_expr init/test_expr.dat.1d)
endif () endif ()
add_test(NAME RunTestExpr_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${RUN_PARALLEL} ${CMAKE_CURRENT_BINARY_DIR}/test_expr init/test_expr.dat.2d) add_test(NAME RunTestExpr_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${RUN_PARALLEL} ${CMAKE_CURRENT_BINARY_DIR}/test_expr init/test_expr.dat.2d)
...@@ -18,8 +18,8 @@ list(APPEND TEST_DEPENDENCIES test_expr) ...@@ -18,8 +18,8 @@ list(APPEND TEST_DEPENDENCIES test_expr)
add_executable(test_basis src/Test_BasisFunction.cc) add_executable(test_basis src/Test_BasisFunction.cc)
target_link_libraries(test_basis ${AMDIS_LIBRARIES}) target_link_libraries(test_basis AMDiS)
if (NOT AMDIS_HAS_PARALLEL_DOMAIN) if (NOT ENABLE_PARALLEL_DOMAIN)
add_test(NAME RunTestBasis_1d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_basis init/test_basisFct.dat.1d) add_test(NAME RunTestBasis_1d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_basis init/test_basisFct.dat.1d)
endif () endif ()
add_test(NAME RunTestBasis_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${RUN_PARALLEL} ${CMAKE_CURRENT_BINARY_DIR}/test_basis init/test_basisFct.dat.2d) add_test(NAME RunTestBasis_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${RUN_PARALLEL} ${CMAKE_CURRENT_BINARY_DIR}/test_basis init/test_basisFct.dat.2d)
...@@ -28,21 +28,21 @@ list(APPEND TEST_DEPENDENCIES test_basis) ...@@ -28,21 +28,21 @@ list(APPEND TEST_DEPENDENCIES test_basis)
add_executable(test_writer src/Test_Writer.cc) add_executable(test_writer src/Test_Writer.cc)
target_link_libraries(test_writer ${AMDIS_LIBRARIES}) target_link_libraries(test_writer AMDiS)
list(APPEND TEST_DEPENDENCIES test_writer) list(APPEND TEST_DEPENDENCIES test_writer)
add_executable(test_arh3 src/Test_Arh3.cc) add_executable(test_arh3 src/Test_Arh3.cc)
target_link_libraries(test_arh3 ${AMDIS_LIBRARIES}) target_link_libraries(test_arh3 AMDiS)
list(APPEND TEST_DEPENDENCIES test_arh3) list(APPEND TEST_DEPENDENCIES test_arh3)
add_executable(test_mat_vec src/Test_MatrixVectorOperations.cc) add_executable(test_mat_vec src/Test_MatrixVectorOperations.cc)
target_link_libraries(test_mat_vec ${AMDIS_LIBRARIES}) target_link_libraries(test_mat_vec AMDiS)
list(APPEND TEST_DEPENDENCIES test_mat_vec) list(APPEND TEST_DEPENDENCIES test_mat_vec)
add_executable(test_problemStat src/Test_ProblemStat.cc) add_executable(test_problemStat src/Test_ProblemStat.cc)
target_link_libraries(test_problemStat ${AMDIS_LIBRARIES}) target_link_libraries(test_problemStat AMDiS)
if (NOT AMDIS_HAS_PARALLEL_DOMAIN) if (NOT ENABLE_PARALLEL_DOMAIN)
add_test(NAME RunTestProblemStat_1d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_problemStat init/test_problemStat.dat.1d) add_test(NAME RunTestProblemStat_1d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_problemStat init/test_problemStat.dat.1d)
add_test(NAME RunTestProblemStat_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_problemStat init/test_problemStat.dat.2d) add_test(NAME RunTestProblemStat_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_problemStat init/test_problemStat.dat.2d)
add_test(NAME RunTestProblemStat_3d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_problemStat init/test_problemStat.dat.3d) add_test(NAME RunTestProblemStat_3d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_problemStat init/test_problemStat.dat.3d)
...@@ -51,31 +51,31 @@ list(APPEND TEST_DEPENDENCIES test_problemStat) ...@@ -51,31 +51,31 @@ list(APPEND TEST_DEPENDENCIES test_problemStat)
# parallel tests # parallel tests
if (AMDIS_HAS_PARALLEL_DOMAIN) if (ENABLE_PARALLEL_DOMAIN)
add_executable(test_synch src/Test_Synch.cc) add_executable(test_synch src/Test_Synch.cc)
target_link_libraries(test_synch ${AMDIS_LIBRARIES}) target_link_libraries(test_synch AMDiS)
add_test(NAME RunTestSynch_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${RUN_PARALLEL} ${CMAKE_CURRENT_BINARY_DIR}/test_synch init/test_synch.dat.2d) add_test(NAME RunTestSynch_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${RUN_PARALLEL} ${CMAKE_CURRENT_BINARY_DIR}/test_synch init/test_synch.dat.2d)
add_test(NAME RunTestSynch_3d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${RUN_PARALLEL} ${CMAKE_CURRENT_BINARY_DIR}/test_synch init/test_synch.dat.3d) add_test(NAME RunTestSynch_3d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${RUN_PARALLEL} ${CMAKE_CURRENT_BINARY_DIR}/test_synch init/test_synch.dat.3d)
list(APPEND TEST_DEPENDENCIES test_synch) list(APPEND TEST_DEPENDENCIES test_synch)
endif (AMDIS_HAS_PARALLEL_DOMAIN) endif (ENABLE_PARALLEL_DOMAIN)
# tests if AMDiS-Extensions # tests if AMDiS-Extensions
if (AMDIS_NEED_EXTENSIONS AND NOT AMDIS_HAS_PARALLEL_DOMAIN) if (ENABLE_EXTENSIONS AND NOT ENABLE_PARALLEL_DOMAIN)
add_executable(test_bg_mesh src/Test_BackgroundMesh2.cc) add_executable(test_bg_mesh src/Test_BackgroundMesh2.cc)
target_link_libraries(test_bg_mesh ${AMDIS_LIBRARIES}) target_link_libraries(test_bg_mesh AMDiS)
add_test(NAME RunTestBgMesh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_bg_mesh init/test_bg_mesh.dat) add_test(NAME RunTestBgMesh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_bg_mesh init/test_bg_mesh.dat)
list(APPEND TEST_DEPENDENCIES test_bg_mesh) list(APPEND TEST_DEPENDENCIES test_bg_mesh)
add_executable(test_views src/Test_Views.cc) add_executable(test_views src/Test_Views.cc)
target_link_libraries(test_views ${AMDIS_LIBRARIES}) target_link_libraries(test_views AMDiS)
add_test(NAME RunTestViews_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_views init/test_views.dat.2d) add_test(NAME RunTestViews_2d WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND test_views init/test_views.dat.2d)
list(APPEND TEST_DEPENDENCIES test_views) list(APPEND TEST_DEPENDENCIES test_views)
add_executable(test_vtk src/Test_Vtk.cc) add_executable(test_vtk src/Test_Vtk.cc)
target_link_libraries(test_vtk ${AMDIS_LIBRARIES}) target_link_libraries(test_vtk AMDiS)
list(APPEND TEST_DEPENDENCIES test_vtk) list(APPEND TEST_DEPENDENCIES test_vtk)
endif (AMDIS_NEED_EXTENSIONS AND NOT AMDIS_HAS_PARALLEL_DOMAIN) endif (ENABLE_EXTENSIONS AND NOT ENABLE_PARALLEL_DOMAIN)
add_dependencies(check ${TEST_DEPENDENCIES}) add_dependencies(check ${TEST_DEPENDENCIES})
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
* Web: https://fusionforge.zih.tu-dresden.de/projects/amdis * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
* *
* Authors: * Authors:
* Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
* *
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* This file is part of AMDiS * This file is part of AMDiS
*