forked from Kitware/ParaView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (33 loc) · 899 Bytes
/
CMakeLists.txt
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
set(sources
Box.F90
ConjugateGradient.F90
FEDriver.F90
PoissonDiscretization.F90
SparseMatrix.F90)
if (USE_CATALYST)
# We don't create a separate library for the adaptor here
# since FEFortranAdaptor.F90 depends on Box.F90
list(APPEND sources
FECxxAdaptor.cxx
FEFortranAdaptor.F90)
endif ()
add_executable(FortranPoissonSolver ${sources})
target_link_libraries(FortranPoissonSolver
PRIVATE
MPI::MPI_Fortran)
if (USE_CATALYST)
target_link_libraries(FortranPoissonSolver
PRIVATE
ParaView::PythonCatalyst
VTK::ParallelMPI)
endif ()
set_property(TARGET FortranPoissonSolver
PROPERTY
LINKER_LANGUAGE Fortran)
if (BUILD_TESTING)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/SampleScripts/coproc.py
${CMAKE_CURRENT_BINARY_DIR}/coproc.py
COPYONLY)
add_test(NAME FortranPoissonSolverTest COMMAND FortranPoissonSolver coproc.py)
endif()