CMakeLists.txt 2.63 KB
Newer Older
1
2
3
project("amdis_demo")
cmake_minimum_required(VERSION 2.8)

Thomas Witkowski's avatar
Thomas Witkowski committed
4
5
#find_package(AMDIS REQUIRED COMPONENTS umfpack )
find_package(AMDIS REQUIRED)
6

Thomas Witkowski's avatar
Thomas Witkowski committed
7
if(AMDIS_FOUND)
8
	message("amdis was found\n")
Thomas Witkowski's avatar
Thomas Witkowski committed
9
10
11
	include(${AMDIS_USE_FILE})
	SET(BASIS_LIBS ${AMDIS_LIBRARIES})
endif(AMDIS_FOUND)
12

13
14
15
16
17
18
19
20
21
# find tools-directory
find_path(TOOLS_DIR NAMES "baseProblem" "diffuseDomain" DOC "path to tools directory in AMDiS-trunk dir" NO_DEFAULT_PATH)
if (TOOLS_DIR)
  if (NOT EXISTS ${TOOLS_DIR}/diffuseDomain/Helpers.h OR NOT EXISTS ${TOOLS_DIR}/baseProblems/BaseProblem.h)
    message(FATAL_ERROR "wrong tools directory! Directory must contain the subdirectories 'diffuseDomain' and 'baseProblems'")
  endif()    
else()
  message(FATAL_ERROR "no tools-directory specified!")
endif(TOOLS_DIR)
Praetorius, Simon's avatar
Praetorius, Simon committed
22
23
24
25

include_directories(${TOOLS_DIR}/diffuseDomain)
include_directories(${TOOLS_DIR}/baseProblems)

26
27
28
29
set(ball src/ball.cc)
set(bunny src/bunny.cc)
set(cahn_hilliard src/cahn_hilliard.cc ${TOOLS_DIR}/baseProblems/CahnHilliard.cc)
set(ellipt src/ellipt.cc)
Praetorius, Simon's avatar
Praetorius, Simon committed
30
set(elliptBase src/elliptBaseProblem.cc)
31
32
33
34
35
36
37
38
39
40
41
42
43
set(elliptImplicit src/elliptImplicit.cc)
set(heat src/heat.cc)
set(neumann src/neumann.cc)
set(nonlin src/nonlin.cc)
set(parametric src/parametric.cc)
set(periodic src/periodic.cc)
set(sphere src/sphere.cc)
set(torus src/torus.cc)
set(vecellipt src/vecellipt.cc)
set(vecheat src/vecheat.cc)

add_executable("ball" ${ball})
target_link_libraries("ball" ${BASIS_LIBS})
Praetorius, Simon's avatar
Praetorius, Simon committed
44

45
46
add_executable("bunny" ${bunny})
target_link_libraries("bunny" ${BASIS_LIBS})
Praetorius, Simon's avatar
Praetorius, Simon committed
47

48
add_executable("cahn_hilliard" ${cahn_hilliard})
Praetorius, Simon's avatar
Praetorius, Simon committed
49
50
target_link_libraries("cahn_hilliard" ${BASIS_LIBS})

51
52
53
54
55
add_executable("ellipt" ${ellipt})
target_link_libraries("ellipt" ${BASIS_LIBS})

add_executable("elliptBase" ${elliptBase})
target_link_libraries("elliptBase" ${BASIS_LIBS})
Praetorius, Simon's avatar
Praetorius, Simon committed
56
57
58
59

add_executable("elliptImplicit" ${elliptImplicit})
target_link_libraries("elliptImplicit" ${BASIS_LIBS})

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
add_executable("heat" ${heat})
target_link_libraries("heat" ${BASIS_LIBS})

add_executable("neumann" ${neumann})
target_link_libraries("neumann" ${BASIS_LIBS})

add_executable("nonlin" ${nonlin})
target_link_libraries("nonlin" ${BASIS_LIBS})

add_executable("parametric" ${parametric})
target_link_libraries("parametric" ${BASIS_LIBS})

add_executable("periodic" ${periodic})
target_link_libraries("periodic" ${BASIS_LIBS})

add_executable("sphere" ${sphere})
target_link_libraries("sphere" ${BASIS_LIBS})

add_executable("torus" ${torus})
target_link_libraries("torus" ${BASIS_LIBS})

add_executable("vecellipt" ${vecellipt})
target_link_libraries("vecellipt" ${BASIS_LIBS})

add_executable("vecheat" ${vecheat})
target_link_libraries("vecheat" ${BASIS_LIBS})
86
87

#create the output dir
Praetorius, Simon's avatar
Praetorius, Simon committed
88
# file(MAKE_DIRECTORY output)