Commit 6ee7fbad authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

[CMake] All tests are built except the ones in need of PDELab.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10751 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 080baf66
......@@ -23,7 +23,6 @@ add_subdirectory("tutorial")
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
message("<<<< DUNE_GRID_VERSION: ${DUNE_GRID_VERSION}")
# # constexpr
......
......@@ -29,7 +29,7 @@
/* end private */
/* Define to 1 if dune-pdelab is patched to be usable by DuMuX */
#define DUNE_PDELAB_IS_PATCHED_FOR_DUMUX 1
/* #undef DUNE_PDELAB_IS_PATCHED_FOR_DUMUX */
/* DEPRECATED: will be removed after DuMuX 2.4. USE WITH CARE: Forces a
function to be inlined even for non-optimized builds */
......
......@@ -13,4 +13,3 @@ foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# add build targets
add_executable("test_diffusion" test_diffusion.cc)
target_link_libraries("test_diffusion" ${DumuxLinkLibraries})
add_executable("test_dec1p" test_1p.cc)
target_link_libraries("test_dec1p" ${DumuxLinkLibraries})
add_executable("test_diffusion" test_diffusion.cc)
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS test_dec1p test_diffusion)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_diffusion"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# add build targets
ADD_EXECUTABLE("test_impes" test_impes.cc)
target_link_libraries("test_impes" ${DumuxLinkLibraries})
add_executable("test_impes" test_impes.cc)
add_executable("test_impesadaptive" test_impesadaptive.cc)
target_link_libraries("test_impesadaptive" ${DumuxLinkLibraries})
add_dune_alugrid_flags(test_impesadaptive)
add_executable("test_impeswithamg" test_impeswithamg.cc)
target_link_libraries("test_impeswithamg" ${DumuxLinkLibraries})
add_executable("test_transport" test_transport.cc)
target_link_libraries("test_transport" ${DumuxLinkLibraries})
add_executable("test_mpfa2p" test_mpfa2p.cc)
target_link_libraries("test_mpfa2p" ${DumuxLinkLibraries})
add_dune_superlu_flags("test_mpfa2p")
add_dune_alugrid_flags(test_mpfa2p)
add_dune_superlu_flags(test_mpfa2p)
>>>>>>> [CMake] All tests are built except the ones in need of PDELab.
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_impes
test_impesadaptive
test_transport
test_mpfa2p)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_transport"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# add build targets
add_executable("test_adaptive2p2c" test_adaptive2p2c.cc)
target_link_libraries("test_adaptive2p2c" ${DumuxLinkLibraries})
add_dune_alugrid_flags(test_adaptive2p2c)
add_executable("test_dec2p2c" test_dec2p2c.cc)
target_link_libraries("test_dec2p2c" ${DumuxLinkLibraries})
add_executable("test_multiphysics2p2c" test_multiphysics2p2c.cc)
target_link_libraries("test_multiphysics2p2c" ${DumuxLinkLibraries})
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_adaptive2p2c
test_dec2p2c
test_multiphysics2p2c)
set(ALLTESTS ${NORMALTESTS})
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# add build targets
add_executable("test_navierstokes" test_navierstokes.cc)
if(SUPERLU_FOUND AND (UG_FOUND OR ALUGrid_FOUND))
set_target_properties("test_navierstokes"
PROPERTIES
COMPILE_FLAGS "${UG_CPPFLAGS} ${ALUGrid_CPPFLAGS}")
target_link_libraries("test_navierstokes"
${DumuxLinkLibraries}
${UG_LIBS}
${ALUGrid_LIBS})
add_dune_superlu_flags("test_navierstokes")
endif(SUPERLU_FOUND AND (UG_FOUND OR ALUGrid_FOUND))
add_dune_superlu_flags(test_navierstokes)
add_dune_alugrid_flags(test_navierstokes)
add_dune_ug_flags(test_navierstokes)
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS test_navierstokes)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_navierstokes"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# add build targets
add_executable("test_stokes" test_stokes.cc)
target_link_libraries("test_stokes" ${DumuxLinkLibraries})
add_dune_superlu_flags("test_stokes")
add_dune_superlu_flags(test_stokes)
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS test_stokes)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_stokes"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# add build targets
add_executable("test_stokes2c" test_stokes2c.cc)
target_link_libraries("test_stokes2c" ${DumuxLinkLibraries})
add_dune_superlu_flags("test_stokes2c")
add_dune_superlu_flags(test_stokes2c)
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS test_stokes2c)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_stokes2c"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# add build targets
add_executable("test_stokes2cni" test_stokes2cni.cc)
target_link_libraries("test_stokes2cni" ${DumuxLinkLibraries})
add_dune_superlu_flags("test_stokes2cni")
add_dune_superlu_flags(test_stokes2cni)
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS test_stokes2cni)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_stokes2cni"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# build target for the onephase-onecomponent test problem
add_executable("test_box1p" test_box1p.cc)
target_link_libraries("test_box1p" ${DumuxLinkLibraries})
add_executable("test_box1pwithamg" test_box1pwithamg.cc)
target_link_libraries("test_box1pwithamg" ${DumuxLinkLibraries})
add_executable("test_cc1p" test_cc1p.cc)
target_link_libraries("test_cc1p" ${DumuxLinkLibraries})
add_executable("test_cc1pwithamg" test_cc1pwithamg.cc)
target_link_libraries("test_cc1pwithamg" ${DumuxLinkLibraries})
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_box1p
test_box1pwithamg
test_cc1p
test_cc1pwithamg)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_box1p"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
add_executable("test_box1p2c" test_box1p2c.cc)
target_link_libraries("test_box1p2c" ${DumuxLinkLibraries})
add_executable("test_cc1p2c" test_cc1p2c.cc)
target_link_libraries("test_cc1p2c" ${DumuxLinkLibraries})
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_box1p2c
test_cc1p2c)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_box1p2c"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# build target for the simple twophase lens problem
add_executable("test_box2p" test_box2p.cc)
target_link_libraries("test_box2p" ${DumuxLinkLibraries})
add_executable("test_cc2p" test_cc2p.cc)
target_link_libraries("test_cc2p" ${DumuxLinkLibraries})
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_box2p
test_cc2p)
set(ALLTESTS ${NORMALTESTS})
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_box2p"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# build target for the twophase-twocomponent test problem
add_executable("test_box2p2c" test_box2p2c.cc)
target_link_libraries("test_box2p2c" ${DumuxLinkLibraries})
add_executable("test_cc2p2c" test_cc2p2c.cc)
target_link_libraries("test_cc2p2c" ${DumuxLinkLibraries})
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_box2p2c
test_cc2p2c)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_box2p2c"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# build target for the 2p2cni test problem
add_executable("test_box2p2cni" test_box2p2cni.cc)
target_link_libraries("test_box2p2cni" ${DumuxLinkLibraries})
add_executable("test_cc2p2cni" test_cc2p2cni.cc)
target_link_libraries("test_cc2p2cni" ${DumuxLinkLibraries})
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_box2p2cni
test_cc2p2cni)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_box2p2cni"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
add_executable("test_2pdfm" test_2pdfm.cc)
target_link_libraries("test_2pdfm" ${DumuxLinkLibraries})
add_dune_ug_flags(test_2pdfm)
# add required libraries and includes to the build flags
if(UG_FOUND)
set_target_properties("test_2pdfm"
PROPERTIES
COMPILE_FLAGS "${UG_CPPFLAGS}")
target_link_libraries("test_2pdfm"
${DumuxLinkLibraries}
${UG_LIBS})
endif(UG_FOUND)
set(NORMALTESTS test_2pdfm)
set(ALLTESTS ${NORMALTESTS})
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_2pdfm"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
add_executable("test_box2pni" test_box2pni.cc)
target_link_libraries("test_box2pni" ${DumuxLinkLibraries})
add_executable("test_cc2pni" test_cc2pni.cc)
target_link_libraries("test_cc2pni" ${DumuxLinkLibraries})
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_box2pni
test_cc2pni)
set(ALLTESTS ${NORMALTESTS})
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_box2pni"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
add_executable("test_box3p3c" test_box3p3c.cc)
target_link_libraries("test_box3p3c" ${DumuxLinkLibraries})
add_executable("test_cc3p3c" test_cc3p3c.cc)
target_link_libraries("test_cc3p3c" ${DumuxLinkLibraries})
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_box3p3c
test_cc3p3c)
set(ALLTESTS ${NORMALTESTS})
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_box3p3c"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
add_executable("test_box3p3cni" test_box3p3cni.cc)
target_link_libraries("test_box3p3cni" ${DumuxLinkLibraries})
add_executable("test_cc3p3cni" test_cc3p3cni.cc)
target_link_libraries("test_cc3p3cni" ${DumuxLinkLibraries})
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_box3p3cni
test_cc3p3cni)
set(ALLTESTS ${NORMALTESTS})
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_box3p3cni"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
# build target for the CO2 test problem
add_executable("test_boxco2" test_boxco2.cc)
target_link_libraries("test_boxco2" ${DumuxLinkLibraries})
add_dune_alugrid_flags(test_boxco2)
add_executable("test_ccco2" test_ccco2.cc)
target_link_libraries("test_ccco2" ${DumuxLinkLibraries})
add_dune_alugrid_flags(test_ccco2)
# add required libraries and includes to the build flags
link_directories(${DumuxLinkDirectories})
include_directories(${DumuxIncludeDirectories})
set(NORMALTESTS
test_boxco2
test_ccco2)
set(ALLTESTS ${NORMALTESTS})
# make sure the grids are present in the build directory
add_custom_command(TARGET "test_boxco2"
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/grids"
"${CMAKE_CURRENT_BINARY_DIR}/grids")
# We do not want want to build the tests during make all,
# but just build them on demand
add_directory_test_target(_test_target)
add_dependencies(${_test_target} ${ALLTESTS})
foreach(_exe ${ALLTESTS})
target_link_libraries(${_exe} ${DUNE_LIBS})
add_test(${_exe} ${_exe})
endforeach(_exe ${ALLTESTS})
Supports Markdown
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