CMakeLists.txt 2.13 KB
Newer Older
Praetorius, Simon's avatar
Praetorius, Simon committed
1 2
add_executable("testiterator" testiterator.cc)
target_link_dune_default_libraries("testiterator")
3 4 5
if (HAVE_ALBERTA)
  add_dune_alberta_flags(GRIDDIM 3 WORLDDIM 3 "testiterator")
endif (HAVE_ALBERTA)
Praetorius, Simon's avatar
Praetorius, Simon committed
6

7 8 9
add_executable("localrefinement" localrefinement.cc)
target_link_dune_default_libraries("localrefinement")

Praetorius, Simon's avatar
Praetorius, Simon committed
10 11
add_executable("uggrid" uggrid.cc)
target_link_dune_default_libraries("uggrid")
12

13 14
add_executable("multigridview" multigridview.cc)
target_link_dune_default_libraries("multigridview")
15

16 17 18
add_executable("hierarchiciterator" hierarchiciterator.cc)
target_link_dune_default_libraries("hierarchiciterator")

19 20
add_executable("interpolate" interpolate.cc)
target_link_dune_default_libraries("interpolate")
21 22
add_executable("taylorhood" taylorhood.cc)
target_link_dune_default_libraries("taylorhood")
23 24
if (HAVE_ALBERTA)
  add_dune_alberta_flags("interpolate")
25
  add_dune_alberta_flags("taylorhood")
26 27
endif ()

Praetorius, Simon's avatar
Praetorius, Simon committed
28 29 30 31 32 33 34 35 36 37

add_executable("benchmark" benchmark.cc)
target_link_dune_default_libraries("benchmark")
if (HAVE_ALBERTA)
  add_dune_alberta_flags(GRIDDIM 2 WORLDDIM 2 "benchmark")
endif ()

add_executable("profiling" profiling.cc)
target_link_dune_default_libraries("profiling")

38 39 40 41 42 43 44 45 46 47 48 49
find_package(MTL 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()

  if (HAVE_UMFPACK OR ENABLE_SUITESPARSE OR SuiteSparse_FOUND)
    list(APPEND MTL_COMPILE_DEFINITIONS "MTL_HAS_UMFPACK")
  endif ()

50 51 52 53 54 55 56 57 58 59 60 61 62 63
  set(MTL_TARGETS "")
  list(APPEND MTL_TARGETS "phasefield" "phasefield2" "phasefield3" "phasefield4")

  foreach(target ${MTL_TARGETS})
    add_executable(${target} ${target}.cc)
    target_link_dune_default_libraries(${target})
    if (HAVE_ALBERTA)
      add_dune_alberta_flags(${target})
    endif (HAVE_ALBERTA)
    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
endif ()