CMakeLists.txt 2.67 KB
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1 2 3 4 5 6 7
set(SOURCE
    ${SOURCE}
    ${CMAKE_CURRENT_SOURCE_DIR}/solver.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/sparse.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_ani.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_ddpqiluc2.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_petsc.cpp
Kirill Terekhov's avatar
Kirill Terekhov committed
8
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_superlu.cpp
Kirill Terekhov's avatar
Kirill Terekhov committed
9 10 11 12 13 14
)

set(HEADER
    ${HEADER}
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_prototypes.hpp
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_petsc.h
Kirill Terekhov's avatar
Kirill Terekhov committed
15
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_superlu.h
Kirill Terekhov's avatar
Kirill Terekhov committed
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 56 57 58 59 60 61 62 63 64
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_ilu2.hpp
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_ddpqiluc2.hpp
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_bcgsl.hpp
    ${CMAKE_CURRENT_SOURCE_DIR}/solver_ani.h
)


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)
  list(APPEND SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/solver_fcbiilu2.cpp fcbiilu2.cpp)
else()
  set(HAVE_SOLVER_FCBIILU2 FALSE)
endif()

if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/solver_k3biilu2.h" AND EXISTS
		"${CMAKE_CURRENT_SOURCE_DIR}/solver_k3biilu2.cpp" AND EXISTS
		"${CMAKE_CURRENT_SOURCE_DIR}/k3d.h" AND EXISTS
		"${CMAKE_CURRENT_SOURCE_DIR}/k3d.cpp" )
  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()

set(HEADER ${HEADER} PARENT_SCOPE)
set(SOURCE ${SOURCE} PARENT_SCOPE)
set(SOLVER_DEFINITIONS ${SOLVER_DEFINITIONS} PARENT_SCOPE)