project(Tests)

enable_testing()

set(SOURCE_FILES
        automata/AutomatonTest.cpp
        switss-test.cpp
        builder/ProductMatrixBuilderTest.cpp
        models/ProductMdpTest.cpp
        storage/StorageTest.cpp
        builder/IndexSetBuilderTest.cpp
        models/MecQuotientTest.cpp
        models/ReachabilityFormTest.cpp
        certification/CertifierTest.cpp
        certification/LpHelperTest.cpp
        models/MdpTest.cpp
        certification/UBACertifierTest.cpp
        queries/QueryTest.cpp
        queries/ExpressionTest.cpp
        automata/LtlTranslator.cpp
        certification/MecCertifierTest.cpp
        storage/ConfigTest.cpp
        certification/ValueIterationHelperTest.cpp
        certification/ReachabilityCertifierTest.cpp
)

add_executable(
        ${PROJECT_NAME}
        ${SOURCE_FILES}
)

# Set target directories and dependencies
target_include_directories(${PROJECT_NAME} PUBLIC ${SOURCE_FILES} ${storm_INCLUDE_DIR} ${storm-parsers_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME}
        PRIVATE storm storm-parsers
        switss-multi-lib
        GTest::gtest_main)
# Include dependencies for testing
include(FetchContent)
FetchContent_Declare(
        googletest
        URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

include(GoogleTest)
gtest_discover_tests(${PROJECT_NAME})

set(SWITSS_EXAMPLES_REL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../examples/")
get_filename_component(SWITSS_EXAMPLES_PATH ${SWITSS_EXAMPLES_REL_PATH} ABSOLUTE)
add_definitions("-DSWITSS_EXAMPLES_PATH=\"${SWITSS_EXAMPLES_PATH}\"")

