PKGNAME=onnxruntime
PKGSEC=lib
PKGDEP="microsoft-gsl"
BUILDDEP="cmake"
PKGDES="Runtime accelerator for ONNX machine learning models"

ABTYPE=cmake
CMAKE_AFTER=(
    # FIXME: in order to override source path, -S "$SRCDIR/cmake" intentionally conflict with cmake template built-in value.
    # this rely on a documented bug of cmake, according to https://cmake.org/cmake/help/v3.31/manual/cmake.1.html
    #   CMake warns when multiple source paths are specified. This has never been officially documented or supported,
    #   but older versions accidentally accepted multiple source paths and used the last path specified.
    #   Avoid passing multiple source path arguments.
    -S "$SRCDIR/cmake"
    "-DUSE_SYSTEM_LIBS=ON"
    "-Donnxruntime_BUILD_SHARED_LIB=ON"
    "-Donnxruntime_BUILD_UNIT_TESTS=OFF"
    "-DCMAKE_CXX_FLAGS=\"-Wno-range-loop-construct\""
)
