CMakeLists.txt 2.4 KB
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1 2
set(SOURCE
    ${SOURCE}
Dmitry Bagaev's avatar
Dmitry Bagaev committed
3 4
    ${CMAKE_CURRENT_SOURCE_DIR}/Solver.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/SolverFactory.cpp
Kirill Terekhov's avatar
Kirill Terekhov committed
5 6 7 8 9
    ${CMAKE_CURRENT_SOURCE_DIR}/sparse.cpp
)

set(HEADER
    ${HEADER}
Dmitry Bagaev's avatar
Dmitry Bagaev committed
10
    ${CMAKE_CURRENT_SOURCE_DIR}/SolverFactory.h
Kirill Terekhov's avatar
Kirill Terekhov committed
11 12
)

Dmitry Bagaev's avatar
Dmitry Bagaev committed
13 14 15 16 17 18 19 20
add_subdirectory(solver_inner)

if(USE_SOLVER_PETSC)
  add_subdirectory(solver_petsc)
endif()



Kirill Terekhov's avatar
Kirill Terekhov committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/solver_mtiluc2.hpp" AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/solver_mtiluc2.cpp" )
  set(SOLVER_DEFINITIONS ${SOLVER_DEFINITIONS} -DHAVE_SOLVER_MPTILUC2)
  set(HAVE_SOLVER_MPTILUC2 TRUE PARENT_SCOPE)
  list(APPEND HEADER ${CMAKE_CURRENT_SOURCE_DIR}/solver_mtiluc2.hpp)
  list(APPEND SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/solver_mtiluc2.cpp)
else()
  set(HAVE_SOLVER_MPTILUC2 FALSE PARENT_SCOPE)
endif()

if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/solver_mtilu2.hpp" )
  set(SOLVER_DEFINITIONS ${SOLVER_DEFINITIONS} -DHAVE_SOLVER_MPTILU2)
  set(HAVE_SOLVER_MPTILU2 TRUE PARENT_SCOPE)
  list(APPEND HEADER ${CMAKE_CURRENT_SOURCE_DIR}/solver_mtilu2.hpp)
  list(APPEND SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/solver_mtilu2.cpp)
else()
  set(HAVE_SOLVER_MPTILU2 FALSE PARENT_SCOPE)
endif()

if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/solver_fcbiilu2.h" AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/solver_fcbiilu2.cpp" AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/fcbiilu2.cpp" )
  set(SOLVER_DEFINITIONS ${SOLVER_DEFINITIONS} -DHAVE_SOLVER_FCBIILU2)
  set(HAVE_SOLVER_FCBIILU2 TRUE PARENT_SCOPE)
  list(APPEND HEADER ${CMAKE_CURRENT_SOURCE_DIR}/solver_fcbiilu2.h)
44
  list(APPEND SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/solver_fcbiilu2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/fcbiilu2.cpp)
Kirill Terekhov's avatar
Kirill Terekhov committed
45 46 47
else()
  set(HAVE_SOLVER_FCBIILU2 FALSE)
endif()
48 49 50
if (USE_MPI)
  if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/solver_k3biilu2.h" AND EXISTS
  		"${CMAKE_CURRENT_SOURCE_DIR}/solver_k3biilu2.cpp" AND EXISTS
Kirill Terekhov's avatar
Kirill Terekhov committed
51 52
		"${CMAKE_CURRENT_SOURCE_DIR}/k3d.h" AND EXISTS
		"${CMAKE_CURRENT_SOURCE_DIR}/k3d.cpp" )
53 54 55 56 57 58 59
    set(SOLVER_DEFINITIONS ${SOLVER_DEFINITIONS} -DHAVE_SOLVER_K3BIILU2)
    set(HAVE_SOLVER_K3BIILU2 TRUE PARENT_SCOPE)
    list(APPEND HEADER ${CMAKE_CURRENT_SOURCE_DIR}/solver_k3biilu2.h ${CMAKE_CURRENT_SOURCE_DIR}/k3d.h)
    list(APPEND SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/solver_k3biilu2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/k3d.cpp)
  else()
    set(HAVE_SOLVER_K3BIILU2 FALSE PARENT_SCOPE)
  endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
60 61
endif()

62

Kirill Terekhov's avatar
Kirill Terekhov committed
63 64 65
set(HEADER ${HEADER} PARENT_SCOPE)
set(SOURCE ${SOURCE} PARENT_SCOPE)
set(SOLVER_DEFINITIONS ${SOLVER_DEFINITIONS} PARENT_SCOPE)