CMakeLists.txt 1.55 KB
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
project(MatSolve)
set(SOURCE main.cpp)

add_executable(MatSolve ${SOURCE})

target_link_libraries(MatSolve inmost)

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

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

Kirill Terekhov's avatar
Kirill Terekhov committed
42
43
44
45
46
47
48
49
50
51
52
53
54

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


Kirill Terekhov's avatar
Kirill Terekhov committed
55
install(TARGETS MatSolve EXPORT inmost-targets RUNTIME DESTINATION bin)