cmake_minimum_required(VERSION 3.20)
project(wr64_rt_fence_proxy_tests LANGUAGES CXX)
enable_testing()
add_executable(wr64_rt_fence_proxy_test fence_proxy_test.cpp)
target_compile_features(wr64_rt_fence_proxy_test PRIVATE cxx_std_17)
target_include_directories(wr64_rt_fence_proxy_test PRIVATE ../../lib/rt64/src)
if(MSVC)
    target_compile_options(wr64_rt_fence_proxy_test PRIVATE /W4)
endif()
add_test(NAME fence_proxy COMMAND wr64_rt_fence_proxy_test)
set(WR64_FENCE_ARCHIVE_RAM "" CACHE FILEPATH "Optional Sunny native eight-MiB RAM capture")
if(WR64_FENCE_ARCHIVE_RAM)
    add_test(NAME fence_proxy_native_archive COMMAND wr64_rt_fence_proxy_test "${WR64_FENCE_ARCHIVE_RAM}")
endif()
