# Copyright (c) 2025 The YAC Authors
#
# SPDX-License-Identifier: BSD-3-Clause

list(APPEND YAC_TEST_DEFAULT_LABELS "core/interpolation")
list(APPEND YAC_TEST_DEFAULT_LINK yac_utils)

yac_add_test(
  NAME "test_interp_grid_parallel"
  MPI_PROCS 4
  LINK yaxt::yaxt_c
)
yac_add_test(
  NAME "test_interpolation_exchange"
  MPI_PROCS 4
  LINK yaxt::yaxt_c
)
yac_add_test(NAME "test_interpolation_gen_config")
yac_add_test(NAME "test_interp_stack_config" LINK yaxt::yaxt_c)
yac_add_test(
  NAME "test_interpolation_parallel1_c"
  MPI_PROCS 4
  LINK yaxt::yaxt_c
)
yac_add_test(
  NAME "test_interpolation_parallel1"
  MPI_PROCS 4
  LINK MPI::MPI_Fortran yaxt::yaxt_c
)
yac_add_test(
  NAME "test_interpolation_parallel2"
  MPI_PROCS 4
  LINK yaxt::yaxt_c
)
yac_add_test(
  NAME "test_interpolation_parallel3"
  LINK tests_file_common yaxt::yaxt_c
  MPI_PROCS 8
)
yac_add_test(
  NAME "test_interpolation_parallel4"
  LINK tests_file_common yaxt::yaxt_c
  MPI_PROCS 5
)
yac_add_test(
  NAME "test_interpolation_parallel5"
  LINK tests_file_common yaxt::yaxt_c
  MPI_PROCS 3
)
yac_add_test(
  NAME "test_interpolation_parallel6"
  MPI_PROCS 4
  LINK yaxt::yaxt_c
)
yac_add_test(
  NAME "test_interp_weights_parallel"
  LINK NetCDF::NetCDF_C yaxt::yaxt_c
  MPI_PROCS 5
)
set_tests_properties(test_interp_weights_parallel PROPERTIES TIMEOUT 1800)

add_subdirectory(methods)
add_subdirectory(operators)
