CMakeLists.txt 2.29 KB
Newer Older
Praetorius, Simon's avatar
Praetorius, Simon committed
1

2 3 4
add_executable("localrefinement" localrefinement.cc)
target_link_dune_default_libraries("localrefinement")

Praetorius, Simon's avatar
Praetorius, Simon committed
5 6
add_executable("uggrid" uggrid.cc)
target_link_dune_default_libraries("uggrid")
7

Praetorius, Simon's avatar
Praetorius, Simon committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
add_executable("profiling" profiling.cc)
target_link_dune_default_libraries("profiling")

add_executable("benchmark" benchmark.cc)
target_link_dune_default_libraries("benchmark")

add_executable("testiterator" testiterator.cc)
target_link_dune_default_libraries("testiterator")

if (HAVE_ALBERTA)
  add_dune_alberta_flags(GRIDDIM 3 WORLDDIM 3 "testiterator")
  add_dune_alberta_flags(GRIDDIM 2 WORLDDIM 2 "benchmark")
endif (HAVE_ALBERTA)


23 24 25 26 27 28 29
if (DUNE_HAVE_CXX_VARIANT)
  add_executable("multigridview" multigridview.cc)
  target_link_dune_default_libraries("multigridview")

  add_executable("hierarchiciterator" hierarchiciterator.cc)
  target_link_dune_default_libraries("hierarchiciterator")
endif (DUNE_HAVE_CXX_VARIANT)
30

31

Praetorius, Simon's avatar
Praetorius, Simon committed
32 33 34 35
if (dune-functions_FOUND AND dune-alugrid_FOUND AND HAVE_ALBERTA)
  add_executable("interpolate" interpolate.cc)
  target_link_dune_default_libraries("interpolate")
  add_dune_alberta_flags(GRIDDIM 2 WORLDDIM 2 "interpolate")
36

Praetorius, Simon's avatar
Praetorius, Simon committed
37 38 39
  add_executable("taylorhood" taylorhood.cc)
  target_link_dune_default_libraries("taylorhood")
  add_dune_alberta_flags(GRIDDIM 2 WORLDDIM 2 "taylorhood")
Praetorius, Simon's avatar
Praetorius, Simon committed
40

Praetorius, Simon's avatar
Praetorius, Simon committed
41 42 43 44 45 46 47
  find_package(MTL QUIET PATHS /opt/development/mtl4)
  if (MTL_FOUND)
    set(CXX_ELEVEN_FEATURE_LIST "MOVE" "AUTO" "RANGEDFOR" "INITLIST" "STATICASSERT" "DEFAULTIMPL")
    set(MTL_COMPILE_DEFINITIONS "")
    foreach(feature ${CXX_ELEVEN_FEATURE_LIST})
      list(APPEND MTL_COMPILE_DEFINITIONS "MTL_WITH_${feature}")
    endforeach()
Praetorius, Simon's avatar
Praetorius, Simon committed
48

Praetorius, Simon's avatar
Praetorius, Simon committed
49 50 51
    if (HAVE_UMFPACK OR ENABLE_SUITESPARSE OR SuiteSparse_FOUND)
      list(APPEND MTL_COMPILE_DEFINITIONS "MTL_HAS_UMFPACK")
    endif ()
Praetorius, Simon's avatar
Praetorius, Simon committed
52

Praetorius, Simon's avatar
Praetorius, Simon committed
53 54
    set(MTL_TARGETS "")
    list(APPEND MTL_TARGETS "phasefield" "phasefield2" "phasefield3" "phasefield4")
55

Praetorius, Simon's avatar
Praetorius, Simon committed
56 57 58 59 60 61 62 63
    foreach(target ${MTL_TARGETS})
      add_executable(${target} ${target}.cc)
      target_link_dune_default_libraries(${target})
      add_dune_alberta_flags(GRIDDIM 2 WORLDDIM 2 ${target})
      target_include_directories(${target} PRIVATE ${MTL_INCLUDE_DIRS})
      target_compile_definitions(${target} PRIVATE ${MTL_COMPILE_DEFINITIONS})
      target_compile_options(${target} PRIVATE -Wno-deprecated-declarations)
    endforeach()
64

Praetorius, Simon's avatar
Praetorius, Simon committed
65
  endif ()
66
endif ()