CMakeLists.txt 3.07 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
set(ball src/ball.cc)
set(bunny src/bunny.cc)
set(ellipt src/ellipt.cc)
Praetorius, Simon's avatar
Praetorius, Simon committed
16
set(elliptBase src/elliptBaseProblem.cc)
17
18
19
20
21
22
23
24
25
26
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)
Praetorius, Simon's avatar
Praetorius, Simon committed
27
28
set(rhsLaplace src/rhsLaplace.cc)
set(laplace src/laplace.cc)
29
30
31

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

33
34
add_executable("bunny" ${bunny})
target_link_libraries("bunny" ${BASIS_LIBS})
Praetorius, Simon's avatar
Praetorius, Simon committed
35

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
add_executable("ellipt" ${ellipt})
target_link_libraries("ellipt" ${BASIS_LIBS})

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})
65

Praetorius, Simon's avatar
Praetorius, Simon committed
66
# find tools-directory
67
find_path(TOOLS_DIR NAMES "baseProblem/BaseProblem.h" "diffuseDomain/Helpers.h" DOC "Path to tools directory in AMDiS-trunk dir" )
Praetorius, Simon's avatar
Praetorius, Simon committed
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
if (TOOLS_DIR)
  if (NOT EXISTS ${TOOLS_DIR}/diffuseDomain/Helpers.h OR NOT EXISTS ${TOOLS_DIR}/baseProblems/BaseProblem.h)
    message(WARNING "Wrong tools directory! Directory must contain the subdirectories 'diffuseDomain' and 'baseProblems'")
  else()

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


    set(cahn_hilliard src/cahn_hilliard.cc ${TOOLS_DIR}/baseProblems/CahnHilliard.cc)
    add_executable("cahn_hilliard" ${cahn_hilliard})
    target_link_libraries("cahn_hilliard" ${BASIS_LIBS})

    set(drivenCavity ${TOOLS_DIR}/diffuseDomain/POperators.cc
		    ${TOOLS_DIR}/baseProblems/CahnHilliard.cc
		    ${TOOLS_DIR}/baseProblems/NavierStokes_TaylorHood.cc
		    src/chns/drivenCavity.cc)
    add_executable("drivenCavity" ${drivenCavity})
    target_link_libraries("drivenCavity" ${BASIS_LIBS})

88
89
90
91
92
    add_executable("elliptBase" ${elliptBase})
    target_link_libraries("elliptBase" ${BASIS_LIBS})

    add_executable("elliptImplicit" ${elliptImplicit})
    target_link_libraries("elliptImplicit" ${BASIS_LIBS})
Praetorius, Simon's avatar
Praetorius, Simon committed
93
94
95
96
97
  endif()
else()
    message(WARNING "No tools directory specified! Some demos will not be build.")
endif(TOOLS_DIR)

98
#create the output dir
99
# file(MAKE_DIRECTORY output)