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

cmake_minimum_required(VERSION 3.18)

project(yac_downstream_test LANGUAGES C Fortran)

find_package(YAC REQUIRED COMPONENTS mci Fortran)

include(CTest)

# Core tests
add_executable(yac_core_test_c yac_core_test.c)
target_link_libraries(yac_core_test_c YAC::yac_core)
add_test(NAME yac_core_test_c COMMAND yac_core_test_c)

# MCI tests
add_executable(yac_mci_test_c yac_mci_test.c)
target_link_libraries(yac_mci_test_c YAC::yac_mci)
add_test(NAME yac_mci_test_c COMMAND yac_mci_test_c)

# Fortran core tests
add_executable(yac_core_test_f yac_core_test.F90)
target_link_libraries(yac_core_test_f YAC::yac_core)
add_test(NAME yac_core_test_f COMMAND yac_core_test_f)

# Fortran MCI tests
add_executable(yac_mci_test_f yac_mci_test.F90)
target_link_libraries(yac_mci_test_f YAC::yac_mci)
add_test(NAME yac_mci_test_f COMMAND yac_mci_test_f)
