mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-03 23:49:44 +00:00
* Move fbs include from header to cc * add initial cmake for flatbuffers * Move most flatbuffers util to ort_flatbuffers * move code around * fix * move test/perf runner to use flatbuffer directly instead of model * minor update * Fix build break * Clean up includes and foward decl * Fix traning CI build breaks * Addressed PR comment, replaced some include with forward decls * Remove ORT_MUST_USE_RESULT temporarily
19 lines
980 B
CMake
19 lines
980 B
CMake
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
|
|
file(GLOB onnxruntime_flatbuffers_srcs CONFIGURE_DEPENDS
|
|
"${ONNXRUNTIME_ROOT}/core/flatbuffers/*.h"
|
|
"${ONNXRUNTIME_ROOT}/core/flatbuffers/*.cc"
|
|
)
|
|
|
|
source_group(TREE ${REPO_ROOT} FILES ${onnxruntime_flatbuffers_srcs})
|
|
|
|
add_library(onnxruntime_flatbuffers ${onnxruntime_flatbuffers_srcs})
|
|
install(DIRECTORY ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/flatbuffers DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core)
|
|
onnxruntime_add_include_to_target(onnxruntime_flatbuffers onnx flatbuffers)
|
|
if(onnxruntime_ENABLE_INSTRUMENT)
|
|
target_compile_definitions(onnxruntime_flatbuffers PUBLIC ONNXRUNTIME_ENABLE_INSTRUMENT)
|
|
endif()
|
|
target_include_directories(onnxruntime_flatbuffers PRIVATE ${ONNXRUNTIME_ROOT})
|
|
add_dependencies(onnxruntime_flatbuffers ${onnxruntime_EXTERNAL_DEPENDENCIES})
|
|
set_target_properties(onnxruntime_flatbuffers PROPERTIES FOLDER "ONNXRuntime")
|