cmake_minimum_required(VERSION 3.19)

project(asgard_testing VERSION @asgard_VERSION@ LANGUAGES CXX)
enable_testing()

message(STATUS "Testing the ASGarD installation ...")

find_package(asgard @asgard_VERSION@ PATHS "@__asgard_install_prefix@")

add_subdirectory("@__asgard_install_prefix@/share/asgard/examples" examples_cxx)

add_test(continuity_2d  "${CMAKE_CURRENT_BINARY_DIR}/examples_cxx/continuity_2d")
add_test(input_1d       "${CMAKE_CURRENT_BINARY_DIR}/examples_cxx/inputs_1d" "-if" "examples_cxx/inputs_1d_1.txt")

foreach (_example @_asgard_doc_pdes_str@)
    add_test(${_example}  "${CMAKE_CURRENT_BINARY_DIR}/examples_cxx/${_example}" -test)
endforeach()
