ADD_LIBRARY(
    onnx_allocator
    STATIC
    onnx_allocator.cpp
)

# ONNXRuntime 1.26 headers require C++17.
#
# In particular, the public headers use C++17 language features such as
# structured bindings and noexcept function types. Older RedisAI releases were
# originally built against much older ONNXRuntime versions and therefore did
# not require an explicit C++17 standard here.
#
# Keep the requirement local to the ONNX allocator target instead of changing
# the C++ standard globally for all vendored RedisAI backends.
TARGET_COMPILE_FEATURES(
    onnx_allocator
    PRIVATE
    cxx_std_17
)
