mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-23 22:13:38 +00:00
Remove gsl subodule and replace with a local copy of gsl-lite Refactor for onnxruntime::make_unique gsl::span size and index are now size_t Remove lambda auto argument type detection. Remove constexpr from fail_fast in gsl due to Linux not being happy. Comment out std::stream support due to MacOS std lib broken. Move make_unique into include/core/common so it is accessible for server builds. Relax requirements for onnxruntime/test/providers/cpu/ml/write_scores_test.cc due to x86 build. Add ONNXRUNTIME_ROOT to Server Lib includes so gsl is recognized
31 lines
1.5 KiB
CMake
31 lines
1.5 KiB
CMake
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
|
|
file(GLOB onnxruntime_session_srcs CONFIGURE_DEPENDS
|
|
"${ONNXRUNTIME_INCLUDE_DIR}/core/session/*.h"
|
|
"${ONNXRUNTIME_ROOT}/core/session/*.h"
|
|
"${ONNXRUNTIME_ROOT}/core/session/*.cc"
|
|
)
|
|
|
|
source_group(TREE ${REPO_ROOT} FILES ${onnxruntime_session_srcs})
|
|
|
|
add_library(onnxruntime_session ${onnxruntime_session_srcs})
|
|
install(DIRECTORY ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/session DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core)
|
|
onnxruntime_add_include_to_target(onnxruntime_session onnxruntime_common onnxruntime_framework onnx onnx_proto protobuf::libprotobuf)
|
|
target_include_directories(onnxruntime_session PRIVATE ${ONNXRUNTIME_ROOT} ${eigen_INCLUDE_DIRS})
|
|
add_dependencies(onnxruntime_session ${onnxruntime_EXTERNAL_DEPENDENCIES})
|
|
set_target_properties(onnxruntime_session PROPERTIES FOLDER "ONNXRuntime")
|
|
if (onnxruntime_USE_CUDA)
|
|
target_include_directories(onnxruntime_session PRIVATE ${onnxruntime_CUDNN_HOME}/include ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
|
|
endif()
|
|
|
|
if (onnxruntime_ENABLE_LANGUAGE_INTEROP_OPS)
|
|
add_definitions(-DENABLE_LANGUAGE_INTEROP_OPS)
|
|
include(onnxruntime_language_interop_ops.cmake)
|
|
onnxruntime_add_include_to_target(onnxruntime_session onnxruntime_language_interop)
|
|
add_dependencies(onnxruntime_session onnxruntime_language_interop)
|
|
endif()
|
|
|
|
if(onnxruntime_USE_EIGEN_THREADPOOL)
|
|
target_compile_definitions(onnxruntime_session PUBLIC USE_EIGEN_THREADPOOL)
|
|
endif()
|