#
# @file CMakeLists.txt
#
# @brief
#
# @copyright
# Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne)
# SPC (Swiss Plasma Center)
#
# SPClibs is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# SPClibs is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see .
#
# @author
# (in alphabetical order)
# @author Nicolas Richart
# @author Trach-Minh Tran
#
project(bsplines_tests)
add_library(local_util STATIC
pde1dp_mod.f90
pde3d_mod.f90
ppde3d_mod.f90
ppde3d_pb_mod.f90
tcdsmat_mod.f90
meshdist.f90
dismat.f90
ibcmat.f90
disrhs.f90
)
target_link_libraries(local_util PUBLIC bsplines)
set(BS_TESTS
driv1 driv2 driv3 driv4
pde1d pde1dp pde1dp_cmpl
pde2d pde2d_pb
pde1dp_cmpl_dft
pde3d ppde3d ppde3d_pb
fit1d fit1dbc fit1dp
fit2d fit2d1d fit2d_cmpl fit2dbc fit2dbc_x fit2dbc_y
moments optim1 optim2 optim3
tcdsmat tmassmat tbasfun tsparse1
basfun_perf getgrad_perf gridval_perf
test_kron
)
if(HAS_PARDISO)
set(BS_TESTS ${BS_TESTS}
pde1dp_cmpl_pardiso
pde2d_pardiso
pde2d_sym_pardiso
pde2d_sym_pardiso_dft
tsparse2
)
endif()
if(HAS_MUMPS)
set(BS_TESTS ${BS_TESTS}
pde2d_mumps
pde1dp_cmpl_mumps
)
endif()
foreach(test ${BS_TESTS})
add_executable(${test} ${test}.f90)
target_link_libraries(${test} local_util ${LIBS} ${EXTRA_LIBS})
endforeach()