CMakeLists.txt 1.67 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
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
55
project(ADFVDiscr)
set(SOURCE main.cpp)

add_executable(ADFVDiscr ${SOURCE})

target_link_libraries(ADFVDiscr inmost)
#target_include_directories(ADFVDiscr PRIVATE $<TARGET_PROPERTY:inmost,INTERFACE_INCLUDE_DIRECTORIES>)

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


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

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

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