CMakeLists.txt 1.66 KB
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1
2
3
4
5
6
7
project(Solver)
set(SOURCE main.cpp)

add_executable(Solver ${SOURCE})

target_link_libraries(Solver inmost)

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

Kirill Terekhov's avatar
Kirill Terekhov committed
38
39
if(USE_PARTITIONER)
  if(USE_PARTITIONER_ZOLTAN)
Kirill Terekhov's avatar
Kirill Terekhov committed
40
    message("linking Solver with Zoltan")
Kirill Terekhov's avatar
Kirill Terekhov committed
41
42
43
    target_link_libraries(Solver ${ZOLTAN_LIBRARIES})
  endif()
  if(USE_PARTITIONER_PARMETIS)
Kirill Terekhov's avatar
Kirill Terekhov committed
44
    message("linking Solver with ParMETIS")
Kirill Terekhov's avatar
Kirill Terekhov committed
45
46
    target_link_libraries(Solver ${PARMETIS_LIBRARIES})
  endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
47
endif(USE_PARTITIONER)
Kirill Terekhov's avatar
Kirill Terekhov committed
48
49
50
51
52
53
54
55

if(USE_MPI)
  message("linking Solver with MPI")
  target_link_libraries(Solver ${MPI_LIBRARIES}) 
  if(MPI_LINK_FLAGS)
    set_target_properties(Solver PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
  endif() 
endif(USE_MPI)
Kirill Terekhov's avatar
Kirill Terekhov committed
56
57


58
install(TARGETS Solver EXPORT inmost-targets RUNTIME DESTINATION bin)