cmake_minimum_required(VERSION 3.20)
project(esp_private_lxmf_tickets LANGUAGES CXX)
enable_testing()
get_filename_component(REPO "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE)
find_package(Threads REQUIRED)
add_executable(esp_private_lxmf_tickets main.cpp
    "${REPO}/platform/esp/arduino_common/src/chat/infra/store/esp_nvs_lxmf_tickets.cpp")
target_compile_features(esp_private_lxmf_tickets PRIVATE cxx_std_17)
target_include_directories(esp_private_lxmf_tickets PRIVATE ports
    "${REPO}/modules/core_chat/include" "${REPO}/modules/core_sys/include"
    "${REPO}/platform/esp/arduino_common/include" "${REPO}/platform/esp/common/include")
target_compile_options(esp_private_lxmf_tickets PRIVATE -UNDEBUG -Wall -Wextra -Werror
    -fsanitize=address,undefined -fno-omit-frame-pointer -fstack-usage)
target_link_options(esp_private_lxmf_tickets PRIVATE -fsanitize=address,undefined
    "-Wl,-Map=${CMAKE_CURRENT_BINARY_DIR}/esp_private_lxmf_tickets.map")
target_link_libraries(esp_private_lxmf_tickets PRIVATE Threads::Threads)
add_test(NAME esp_private_lxmf_tickets COMMAND esp_private_lxmf_tickets)
add_executable(esp_private_lxmf_runtime runtime_main.cpp
    "${REPO}/platform/esp/arduino_common/src/chat/infra/store/esp_nvs_lxmf_tickets.cpp"
    "${REPO}/platform/esp/arduino_common/src/storage/storage_runtime.cpp")
target_compile_features(esp_private_lxmf_runtime PRIVATE cxx_std_17)
target_include_directories(esp_private_lxmf_runtime PRIVATE ports
    "${REPO}/modules/core_chat/include" "${REPO}/modules/core_sys/include"
    "${REPO}/platform/esp/arduino_common/include" "${REPO}/platform/esp/common/include")
target_compile_options(esp_private_lxmf_runtime PRIVATE -UNDEBUG -Wall -Wextra -Werror
    -fsanitize=address,undefined -fno-omit-frame-pointer -fstack-usage)
target_link_options(esp_private_lxmf_runtime PRIVATE -fsanitize=address,undefined
    "-Wl,-Map=${CMAKE_CURRENT_BINARY_DIR}/esp_private_lxmf_runtime.map")
target_link_libraries(esp_private_lxmf_runtime PRIVATE Threads::Threads)
add_test(NAME esp_private_lxmf_runtime COMMAND esp_private_lxmf_runtime)
