cmake_minimum_required(VERSION 3.16)
project(qepg_core_tests LANGUAGES CXX)
enable_testing()
option(SCALERQEC_SANITIZE "Enable address and undefined-behavior sanitizers" OFF)
add_executable(qepg_core_tests tests/core_tests.cpp)
target_include_directories(qepg_core_tests PRIVATE src)
target_compile_features(qepg_core_tests PRIVATE cxx_std_20)
if(SCALERQEC_SANITIZE AND NOT MSVC)
    target_compile_options(qepg_core_tests PRIVATE -fsanitize=address,undefined -fno-omit-frame-pointer)
    target_link_options(qepg_core_tests PRIVATE -fsanitize=address,undefined)
endif()
add_test(NAME qepg_core_tests COMMAND qepg_core_tests)
