Commit 01c066cf authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/add_amdis_executable_grid' into 'master'

added check to add_amdis_executable that chosen Grid exists

See merge request !127
parents 18494066 2af86234
...@@ -104,11 +104,14 @@ function(add_amdis_executable) ...@@ -104,11 +104,14 @@ function(add_amdis_executable)
# add flags for AlbertaGrid # add flags for AlbertaGrid
if(ADDEXE_ALBERTA_GRID) if(ADDEXE_ALBERTA_GRID)
if (NOT ALBERTA_FOUND)
message(FATAL_ERROR "Alberta package required in order to set ALBERTA_GRID flag.")
endif ()
if(NOT ADDEXE_DIM) if(NOT ADDEXE_DIM)
message(FATAL_ERROR "You need to specify dimension for ALBERTA_GRID!") message(FATAL_ERROR "You need to specify dimension DIM for ALBERTA_GRID!")
endif() endif()
if(NOT ADDEXE_DOW) if(NOT ADDEXE_DOW)
message(WARNING "dimensionworld not specified for ALBERTA_GRID. Setting DOW=DIM.") message(WARNING "dimensionworld DOW not specified for ALBERTA_GRID. Setting DOW=DIM.")
endif() endif()
add_dune_alberta_flags(GRIDDIM ${GRIDDIM} WORLDDIM ${WORLDDIM} ${ADDEXE_NAME}) add_dune_alberta_flags(GRIDDIM ${GRIDDIM} WORLDDIM ${WORLDDIM} ${ADDEXE_NAME})
...@@ -116,6 +119,8 @@ function(add_amdis_executable) ...@@ -116,6 +119,8 @@ function(add_amdis_executable)
# add flags for ALUGrid # add flags for ALUGrid
if(ADDEXE_ALU_GRID) if(ADDEXE_ALU_GRID)
# nothing special to do if (NOT dune-alugrid_FOUND)
message(FATAL_ERROR "dune-alugrid package required in order to set ALU_GRID flag.")
endif ()
endif(ADDEXE_ALU_GRID) endif(ADDEXE_ALU_GRID)
endfunction(add_amdis_executable) endfunction(add_amdis_executable)
\ No newline at end of file
...@@ -18,15 +18,19 @@ add_amdis_executable(NAME stokes1.2d SOURCES stokes1.cc DIM 2 DOW 2) ...@@ -18,15 +18,19 @@ add_amdis_executable(NAME stokes1.2d SOURCES stokes1.cc DIM 2 DOW 2)
add_amdis_executable(NAME stokes3.2d SOURCES stokes3.cc DIM 2 DOW 2) add_amdis_executable(NAME stokes3.2d SOURCES stokes3.cc DIM 2 DOW 2)
add_amdis_executable(NAME navier_stokes.2d SOURCES navier_stokes.cc DIM 2 DOW 2) add_amdis_executable(NAME navier_stokes.2d SOURCES navier_stokes.cc DIM 2 DOW 2)
add_amdis_executable(NAME convection_diffusion.2d SOURCES convection_diffusion.cc DIM 2 DOW 2) add_amdis_executable(NAME convection_diffusion.2d SOURCES convection_diffusion.cc DIM 2 DOW 2)
add_amdis_executable(NAME cahn_hilliard.2d SOURCES cahn_hilliard.cc DIM 2 DOW 2 ALBERTA_GRID)
add_dependencies(examples add_dependencies(examples
vecellipt.2d vecellipt.2d
stokes0.2d stokes0.2d
stokes1.2d stokes1.2d
stokes3.2d stokes3.2d
navier_stokes.2d navier_stokes.2d
convection_diffusion.2d convection_diffusion.2d)
cahn_hilliard.2d)
if (ALBERTA_FOUND)
add_amdis_executable(NAME cahn_hilliard.2d SOURCES cahn_hilliard.cc DIM 2 DOW 2 ALBERTA_GRID)
add_dependencies(examples cahn_hilliard.2d)
endif ()
if (dune-foamgrid_FOUND) if (dune-foamgrid_FOUND)
add_amdis_executable(NAME surface.2d SOURCES surface.cc DIM 2 DOW 3 ALBERTA_GRID) add_amdis_executable(NAME surface.2d SOURCES surface.cc DIM 2 DOW 3 ALBERTA_GRID)
......
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