CMakeLists.txt 996 Bytes
Newer Older
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 18 19 20 21 22 23 24 25 26 27 28 29 30 31
if(USE_SOLVER)
  if(USE_SOLVER_ANI)
    message("linking MatSolve with ani3d")
    target_link_libraries(MatSolve ani3d)
  endif()
  if(USE_SOLVER_PETSC)
    message("linking MatSolve with PETSc")
    link_directories(${PETSC_LIBRARY_DIRS})
    target_link_libraries(MatSolve ${PETSC_LIBRARIES})
  endif()
  if(USE_SOLVER_TRILINOS)
    message("linking MatSolve with Trilinos")
    link_directories(${Trilinos_LIBRARY_DIRS})
    link_directories(${Trilinos_TPL_LIBRARY_DIRS})
    target_link_libraries(MatSolve ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
  endif()
32
endif()
33 34

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