diff options
author | CoprDistGit <infra@openeuler.org> | 2024-04-15 02:11:05 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-04-15 02:11:05 +0000 |
commit | e5e2655e0f84a9ca2c49d899bafbd17845ff2d6b (patch) | |
tree | ab4086b9279d9bf7e8564d76d1a1a759c717cbb3 /0001-dont-install-tests.patch | |
parent | 7993554df0b339b282e99a6b02596e63637c44df (diff) |
automatic import of onnxruntime
Diffstat (limited to '0001-dont-install-tests.patch')
-rw-r--r-- | 0001-dont-install-tests.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/0001-dont-install-tests.patch b/0001-dont-install-tests.patch new file mode 100644 index 0000000..c6829ad --- /dev/null +++ b/0001-dont-install-tests.patch @@ -0,0 +1,41 @@ +commit 0d79eafe6fd027adb197c543df39cbdda6e0cbec +Author: Alejandro Álvarez Ayllón <a.alvarezayllon@gmail.com> +Date: Mon Jun 5 11:25:53 2023 +0000 + + Don't install tests + +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 2e54063598..f97cc69249 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -78,6 +78,7 @@ option(onnxruntime_USE_RKNPU "Build with RKNPU support" OFF) + option(onnxruntime_USE_DNNL "Build with DNNL support" OFF) + option(onnxruntime_USE_JSEP "Build with JavaScript implemented kernels support" OFF) + option(onnxruntime_BUILD_UNIT_TESTS "Build ONNXRuntime unit tests" ON) ++option(onnxruntime_INSTALL_UNIT_TESTS "Install ONNXRuntime unit tests" ON) + option(onnxruntime_BUILD_CSHARP "Build C# library" OFF) + option(onnxruntime_BUILD_OBJC "Build Objective-C library" OFF) + option(onnxruntime_USE_PREINSTALLED_EIGEN "Use pre-installed EIGEN. Need to provide eigen_SOURCE_PATH if turn this on." OFF) +diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake +index 9347be180d..09723613e4 100644 +--- a/cmake/onnxruntime_unittests.cmake ++++ b/cmake/onnxruntime_unittests.cmake +@@ -1027,11 +1027,13 @@ if (onnxruntime_USE_TVM) + endif() + endif() + +-install(TARGETS onnx_test_runner +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- BUNDLE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++if (onnxruntime_INSTALL_UNIT_TESTS) ++ install(TARGETS onnx_test_runner ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ BUNDLE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++endif() + + if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) + if(onnxruntime_BUILD_BENCHMARKS) |