Skip to content
Snippets Groups Projects
Commit 23c83bc3 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

Added test for dune-geometry to stay compatible with dune 2.2-svn.

dune-PDELab and dune-geometry are now optional dependencies.
Added stokes modes to testing though they fail.


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7642 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 3795a541
No related branches found
No related tags found
No related merge requests found
...@@ -27,11 +27,12 @@ endif(COMMAND cmake_policy) ...@@ -27,11 +27,12 @@ endif(COMMAND cmake_policy)
find_package(DUNE_grid REQUIRED) find_package(DUNE_grid REQUIRED)
find_package(DUNE_istl REQUIRED) find_package(DUNE_istl REQUIRED)
find_package(DUNE_localfunctions REQUIRED) find_package(DUNE_localfunctions REQUIRED)
#find_package(DUNE_pdelab REQUIRED)
find_package(DUNE_common REQUIRED) find_package(DUNE_common REQUIRED)
############## ##############
# Find the optional packages # Find the optional packages
find_package(DUNE_geometry)
find_package(DUNE_pdelab)
find_package(MPI) find_package(MPI)
find_package(Boost) find_package(Boost)
find_package(Alberta) find_package(Alberta)
...@@ -42,6 +43,7 @@ find_package(SuperLU) ...@@ -42,6 +43,7 @@ find_package(SuperLU)
if(SUPERLU_FOUND) if(SUPERLU_FOUND)
set(SUPERLU_CPPFLAGS "-I${SUPERLU_INCLUDE_DIRS} -DENABLE_SUPERLU") set(SUPERLU_CPPFLAGS "-I${SUPERLU_INCLUDE_DIRS} -DENABLE_SUPERLU")
set(SUPERLU_LIBS "-L${SUPERLU_LIBRARIES} -lsuperlu -L${BLAS_LIBRARIES} -lblas") set(SUPERLU_LIBS "-L${SUPERLU_LIBRARIES} -lsuperlu -L${BLAS_LIBRARIES} -lblas")
#set(SUPERLU_LIBS "${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES}")
#define HAVE_MEM_USAGE_T_EXPANSIONS 1 #define HAVE_MEM_USAGE_T_EXPANSIONS 1
endif(SUPERLU_FOUND) endif(SUPERLU_FOUND)
...@@ -214,10 +216,12 @@ CHECK_CXX_SOURCE_COMPILES(" ...@@ -214,10 +216,12 @@ CHECK_CXX_SOURCE_COMPILES("
# -> for TARGET_LINK_LIBRARIES # -> for TARGET_LINK_LIBRARIES
set(DumuxLinkLibraries set(DumuxLinkLibraries
# "dumux" # the DUMUX library. CMake replaces this by the proper file location # "dumux" # the DUMUX library. CMake replaces this by the proper file location
${DUNE_grid_LIBRARIES}
${DUNE_common_LIBRARIES} ${DUNE_common_LIBRARIES}
${DUNE_geometry_LIBRARIES}
${DUNE_grid_LIBRARIES}
${DUNE_mux_LIBRARIES} ${DUNE_mux_LIBRARIES}
${Boost_LIBRARIES}) ${Boost_LIBRARIES}
"-lm")
# -> for LINK_DIRECTORIES # -> for LINK_DIRECTORIES
set(DumuxLinkDirectories ${Boost_LIBRARY_DIRS}) set(DumuxLinkDirectories ${Boost_LIBRARY_DIRS})
...@@ -227,6 +231,7 @@ set(DumuxIncludeDirectories ...@@ -227,6 +231,7 @@ set(DumuxIncludeDirectories
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}
${DUNE_grid_INCLUDE_DIRS} ${DUNE_grid_INCLUDE_DIRS}
${DUNE_geometry_INCLUDE_DIRS}
${DUNE_common_INCLUDE_DIRS} ${DUNE_common_INCLUDE_DIRS}
${DUNE_istl_INCLUDE_DIRS} ${DUNE_istl_INCLUDE_DIRS}
${DUNE_localfunctions_INCLUDE_DIRS} ${DUNE_localfunctions_INCLUDE_DIRS}
...@@ -381,3 +386,9 @@ add_test(test_dec2p2c bin/runTest.sh test/decoupled/2p2c/test_dec2p2c-reference. ...@@ -381,3 +386,9 @@ add_test(test_dec2p2c bin/runTest.sh test/decoupled/2p2c/test_dec2p2c-reference.
add_test(tutorial_coupled tutorial/tutorial_coupled 1 1) add_test(tutorial_coupled tutorial/tutorial_coupled 1 1)
add_test(tutorial_decoupled tutorial/tutorial_decoupled 1) add_test(tutorial_decoupled tutorial/tutorial_decoupled 1)
if(SUPERLU_FOUND AND DUNE_pdelab_FOUND)
add_test(test_stokes test/freeflow/stokes/test_stokes)
add_test(test_stokes2c test/freeflow/stokes2c/test_stokes2c)
add_test(test_stokes2cni test/freeflow/stokes2cni/test_stokes2cni)
endif(SUPERLU_FOUND AND DUNE_pdelab_FOUND)
# -*-cmake-*-
# - Try to find the DUNE geometry library
# Once done this will define:
# DUNE_geometry_FOUND - system has dune-geometry
# DUNE_geometry_INCLUDE_DIR - incude paths to use dune-geometry
# DUNE_geometry_LIBRARIES - Link these to use dune-geometry
INCLUDE(DumuxMacros)
DumuxSetup("DUNE_geometry" "dune-geometry" "DUNE")
DumuxFindIncludeDir("dune/geometry/type.hh")
DumuxRequiredLibsFound()
DumuxIncludeDirsFound()
DumuxCheckFound()
...@@ -29,8 +29,8 @@ mark_as_advanced(SUPERLU_INCLUDE_DIRS SUPERLU_LIBRARIES) ...@@ -29,8 +29,8 @@ mark_as_advanced(SUPERLU_INCLUDE_DIRS SUPERLU_LIBRARIES)
# if both headers and library are found, store results # if both headers and library are found, store results
if(SUPERLU_FOUND) if(SUPERLU_FOUND)
set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARY})
set(SUPERLU_INCLUDE_DIRS ${SUPERLU_INCLUDE_DIR}) set(SUPERLU_INCLUDE_DIRS ${SUPERLU_INCLUDE_DIR})
set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARY})
# log result # log result
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determing location of SuperLU succeded:\n" "Determing location of SuperLU succeded:\n"
......
#add_subdirectory("stokes") add_subdirectory("stokes")
#add_subdirectory("stokes2c") add_subdirectory("stokes2c")
#add_subdirectory("stokes2cni") add_subdirectory("stokes2cni")
...@@ -3,8 +3,8 @@ add_executable("test_stokes" test_stokes.cc) ...@@ -3,8 +3,8 @@ add_executable("test_stokes" test_stokes.cc)
target_link_libraries("test_stokes" ${DumuxLinkLibraries}) target_link_libraries("test_stokes" ${DumuxLinkLibraries})
set_target_properties("test_stokes" set_target_properties("test_stokes"
PROPERTIES PROPERTIES
COMPILE_FLAGS ${SUPERLU_CPPFLAGS} COMPILE_FLAGS ${SUPERLU_CPPFLAGS})
LINK_FLAGS ${SUPERLU_LIBS}) target_link_libraries("test_stokes" ${SUPERLU_LIBS})
# add required libraries and includes to the build flags # add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories}) link_directories(${DumuxLinkDirectories})
......
...@@ -4,6 +4,7 @@ target_link_libraries("test_stokes2c" ${DumuxLinkLibraries}) ...@@ -4,6 +4,7 @@ target_link_libraries("test_stokes2c" ${DumuxLinkLibraries})
set_target_properties("test_stokes2c" set_target_properties("test_stokes2c"
PROPERTIES PROPERTIES
COMPILE_FLAGS ${SUPERLU_CPPFLAGS}) COMPILE_FLAGS ${SUPERLU_CPPFLAGS})
target_link_libraries("test_stokes2c" ${SUPERLU_LIBS})
# add required libraries and includes to the build flags # add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories}) link_directories(${DumuxLinkDirectories})
......
...@@ -4,6 +4,7 @@ target_link_libraries("test_stokes2cni" ${DumuxLinkLibraries}) ...@@ -4,6 +4,7 @@ target_link_libraries("test_stokes2cni" ${DumuxLinkLibraries})
set_target_properties("test_stokes2cni" set_target_properties("test_stokes2cni"
PROPERTIES PROPERTIES
COMPILE_FLAGS ${SUPERLU_CPPFLAGS}) COMPILE_FLAGS ${SUPERLU_CPPFLAGS})
target_link_libraries("test_stokes2cni" ${SUPERLU_LIBS})
# add required libraries and includes to the build flags # add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories}) link_directories(${DumuxLinkDirectories})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment