CMakeLists.txt 4.95 KB
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1
2
project(ADMFD)

3
add_executable(MFDDIFF diffusion.cpp)
4
add_executable(NMFDDIFF diffusion_nonlinear.cpp)
5
add_executable(MFDELAST elastic.cpp)
Kirill Terekhov's avatar
Kirill Terekhov committed
6

7
target_link_libraries(MFDDIFF inmost)
8
target_link_libraries(NMFDDIFF inmost)
9
target_link_libraries(MFDELAST inmost)
Kirill Terekhov's avatar
Kirill Terekhov committed
10
11
12

if(USE_SOLVER)
  if(USE_SOLVER_ANI)
13
14
    message("linking MFDDIFF with ani3d and BLAS")
    target_link_libraries(MFDDIFF ani3d ${BLAS_LIBRARIES})
Kirill Terekhov's avatar
Kirill Terekhov committed
15
    if(BLAS_LINKER_FLAGS)
16
      set_target_properties(MFDDIFF PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
Kirill Terekhov's avatar
Kirill Terekhov committed
17
18
19
    endif()
  endif()
  if(USE_SOLVER_PETSC)
20
21
    message("linking MFDDIFF with PETSc")
    target_link_libraries(MFDDIFF ${PETSC_LIBRARIES})
Kirill Terekhov's avatar
Kirill Terekhov committed
22
23
  endif()
  if(USE_SOLVER_TRILINOS)
24
25
    message("linking MFDDIFF with Trilinos")
    target_link_libraries(MFDDIFF ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
Kirill Terekhov's avatar
Kirill Terekhov committed
26
27
  endif()
  if(USE_SOLVER_METIS)
28
29
    message("linking MFDDIFF with Metis")
    target_link_libraries(MFDDIFF ${METIS_LIBRARIES})
Kirill Terekhov's avatar
Kirill Terekhov committed
30
31
  endif()
  if(USE_SOLVER_MONDRIAAN)
32
33
    message("linking MFDDIFF with Mondriaan")
    target_link_libraries(MFDDIFF ${MONDRIAAN_LIBRARIES})
Kirill Terekhov's avatar
Kirill Terekhov committed
34
  endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
35
  if(USE_SOLVER_SUPERLU)
36
37
    message("linking MFDDIFF with SuperLU")
    target_link_libraries(MFDDIFF ${SUPERLU_LIBRARIES})
Kirill Terekhov's avatar
Kirill Terekhov committed
38
  endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
39
40
41
42
43
endif()


if(USE_PARTITIONER)
  if(USE_PARTITIONER_ZOLTAN)
44
45
    message("linking MFDDIFF with Zoltan")
    target_link_libraries(MFDDIFF ${ZOLTAN_LIBRARIES})
Kirill Terekhov's avatar
Kirill Terekhov committed
46
47
  endif()
  if(USE_PARTITIONER_PARMETIS)
48
49
    message("linking MFDDIFF with ParMETIS")
    target_link_libraries(MFDDIFF ${PARMETIS_LIBRARIES})
Kirill Terekhov's avatar
Kirill Terekhov committed
50
51
52
53
  endif()
endif()

if(USE_MPI)
54
55
  message("linking MFDDIFF with MPI")
  target_link_libraries(MFDDIFF ${MPI_LIBRARIES}) 
Kirill Terekhov's avatar
Kirill Terekhov committed
56
  if(MPI_LINK_FLAGS)
57
    set_target_properties(MFDDIFF PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
Kirill Terekhov's avatar
Kirill Terekhov committed
58
59
60
  endif() 
endif(USE_MPI)

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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

if(USE_SOLVER)
  if(USE_SOLVER_ANI)
    message("linking NMFDDIFF with ani3d and BLAS")
    target_link_libraries(NMFDDIFF ani3d ${BLAS_LIBRARIES})
    if(BLAS_LINKER_FLAGS)
      set_target_properties(NMFDDIFF PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
    endif()
  endif()
  if(USE_SOLVER_PETSC)
    message("linking NMFDDIFF with PETSc")
    target_link_libraries(NMFDDIFF ${PETSC_LIBRARIES})
  endif()
  if(USE_SOLVER_TRILINOS)
    message("linking NMFDDIFF with Trilinos")
    target_link_libraries(NMFDDIFF ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
  endif()
  if(USE_SOLVER_METIS)
    message("linking NMFDDIFF with Metis")
    target_link_libraries(NMFDDIFF ${METIS_LIBRARIES})
  endif()
  if(USE_SOLVER_MONDRIAAN)
    message("linking NMFDDIFF with Mondriaan")
    target_link_libraries(NMFDDIFF ${MONDRIAAN_LIBRARIES})
  endif()
  if(USE_SOLVER_SUPERLU)
    message("linking NMFDDIFF with SuperLU")
    target_link_libraries(NMFDDIFF ${SUPERLU_LIBRARIES})
  endif()
endif()


if(USE_PARTITIONER)
  if(USE_PARTITIONER_ZOLTAN)
    message("linking NMFDDIFF with Zoltan")
    target_link_libraries(NMFDDIFF ${ZOLTAN_LIBRARIES})
  endif()
  if(USE_PARTITIONER_PARMETIS)
    message("linking NMFDDIFF with ParMETIS")
    target_link_libraries(NMFDDIFF ${PARMETIS_LIBRARIES})
  endif()
endif()

if(USE_MPI)
  message("linking NMFDDIFF with MPI")
  target_link_libraries(NMFDDIFF ${MPI_LIBRARIES}) 
  if(MPI_LINK_FLAGS)
    set_target_properties(NMFDDIFF PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
  endif() 
endif(USE_MPI)


113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
if(USE_SOLVER)
  if(USE_SOLVER_ANI)
    message("linking MFDELAST with ani3d and BLAS")
    target_link_libraries(MFDELAST ani3d ${BLAS_LIBRARIES})
    if(BLAS_LINKER_FLAGS)
      set_target_properties(MFDELAST PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
    endif()
  endif()
  if(USE_SOLVER_PETSC)
    message("linking MFDELAST with PETSc")
    target_link_libraries(MFDELAST ${PETSC_LIBRARIES})
  endif()
  if(USE_SOLVER_TRILINOS)
    message("linking MFDELAST with Trilinos")
    target_link_libraries(MFDELAST ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
  endif()
  if(USE_SOLVER_METIS)
    message("linking MFDELAST with Metis")
    target_link_libraries(MFDELAST ${METIS_LIBRARIES})
  endif()
  if(USE_SOLVER_MONDRIAAN)
    message("linking MFDELAST with Mondriaan")
    target_link_libraries(MFDELAST ${MONDRIAAN_LIBRARIES})
  endif()
  if(USE_SOLVER_SUPERLU)
    message("linking MFDELAST with SuperLU")
    target_link_libraries(MFDELAST ${SUPERLU_LIBRARIES})
  endif()
endif()


if(USE_PARTITIONER)
  if(USE_PARTITIONER_ZOLTAN)
    message("linking MFDELAST with Zoltan")
    target_link_libraries(MFDELAST ${ZOLTAN_LIBRARIES})
  endif()
  if(USE_PARTITIONER_PARMETIS)
    message("linking MFDELAST with ParMETIS")
    target_link_libraries(MFDELAST ${PARMETIS_LIBRARIES})
  endif()
endif()

if(USE_MPI)
  message("linking MFDELAST with MPI")
  target_link_libraries(MFDELAST ${MPI_LIBRARIES}) 
  if(MPI_LINK_FLAGS)
    set_target_properties(MFDELAST PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
  endif() 
endif(USE_MPI)

install(TARGETS MFDDIFF EXPORT inmost-targets RUNTIME DESTINATION bin)
164
install(TARGETS NMFDDIFF EXPORT inmost-targets RUNTIME DESTINATION bin)
165
install(TARGETS MFDELAST EXPORT inmost-targets RUNTIME DESTINATION bin)