include(FetchContent)

FetchContent_Declare(
    unity
    GIT_REPOSITORY https://github.com/ThrowTheSwitch/Unity.git
    GIT_TAG        v2.6.1
)
FetchContent_MakeAvailable(unity)
include_directories(${unity_SOURCE_DIR}/src)

# my-math library tests
add_executable(test_my_math test_my_math.c)
target_include_directories(test_my_math PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../src)
target_link_libraries(test_my_math PUBLIC unity::framework my-math)
add_test(test_math test_my_math)

# app main tests
add_executable(test_main test_main.c)
target_link_libraries(test_main PUBLIC unity::framework app-lib)
add_test(test_main test_main)

