CMakeLists.txt 1.49 KB
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1
project(ADMFD)
2
set(SOURCE main.cpp)
Kirill Terekhov's avatar
Kirill Terekhov committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

add_executable(ADMFD ${SOURCE})

target_link_libraries(ADMFD inmost)

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


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

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

install(TARGETS ADMFD EXPORT inmost-targets RUNTIME DESTINATION bin)