CMakeLists.txt 1.58 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
21
22
23
24
25
26
27
28
29
30
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 ()

31
32
33
34
35
36
37
38
39
40
41
42
43
44
  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()

45
endif ()