summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-onnx-use-system-googletest.patch
diff options
context:
space:
mode:
authorLudovic Courtès <[email protected]>2021-07-30 17:19:34 +0200
committerLudovic Courtès <[email protected]>2021-07-31 01:03:24 +0200
commitfa2d94b5e362c684da812d494463d965e601c18d (patch)
treec1d65cd1497bf947a3d83a064539266e62d06723 /gnu/packages/patches/python-onnx-use-system-googletest.patch
parent2b55f914c3198f9b07399d10502fbdb22b7d6e47 (diff)
gnu: python-onnx: Rename to "onnx".
* gnu/packages/machine-learning.scm (python-onnx): Rename to... (onnx): ... this, and change 'name' field accordingly. (python-onnx): New variable. * gnu/packages/patches/python-onnx-shared-libraries.patch: Rename to... * gnu/packages/patches/onnx-shared-libraries.patch: ... this. * gnu/packages/patches/python-onnx-use-system-googletest.patch: Rename to... * gnu/packages/patches/onnx-use-system-googletest.patch: ... this. * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
Diffstat (limited to 'gnu/packages/patches/python-onnx-use-system-googletest.patch')
-rw-r--r--gnu/packages/patches/python-onnx-use-system-googletest.patch57
1 files changed, 0 insertions, 57 deletions
diff --git a/gnu/packages/patches/python-onnx-use-system-googletest.patch b/gnu/packages/patches/python-onnx-use-system-googletest.patch
deleted file mode 100644
index 5dfcbc6dc3..0000000000
--- a/gnu/packages/patches/python-onnx-use-system-googletest.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-ONNX will build googletest from a Git checkout. Patch CMake to use our
-googletest package and enable tests by default.
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0aa9fda2..a573170c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -22,7 +22,7 @@ option(BUILD_ONNX_PYTHON "Build Python binaries" OFF)
- option(ONNX_GEN_PB_TYPE_STUBS "Generate protobuf python type stubs" ON)
- option(ONNX_WERROR "Build with Werror" OFF)
- option(ONNX_COVERAGE "Build with coverage instrumentation" OFF)
--option(ONNX_BUILD_TESTS "Build ONNX C++ APIs Tests" OFF)
-+option(ONNX_BUILD_TESTS "Build ONNX C++ APIs Tests" ON)
- option(ONNX_USE_LITE_PROTO "Use lite protobuf instead of full." OFF)
- option(ONNXIFI_ENABLE_EXT "Enable onnxifi extensions." OFF)
- if(NOT DEFINED ONNX_ML)
-@@ -82,8 +82,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
- endif()
-
- if(ONNX_BUILD_TESTS)
-- list(APPEND CMAKE_MODULE_PATH ${ONNX_ROOT}/cmake/external)
-- include(googletest)
-+ find_package(GTest REQUIRED)
-+ if(NOT GTest_FOUND)
-+ message(FATAL_ERROR "cannot find googletest")
-+ endif()
- endif()
-
- if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
-diff --git a/cmake/unittest.cmake b/cmake/unittest.cmake
-index e29a93ff..ae146390 100644
---- a/cmake/unittest.cmake
-+++ b/cmake/unittest.cmake
-@@ -6,8 +6,8 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
-
- find_package(Threads)
-
--set(${UT_NAME}_libs ${googletest_STATIC_LIBRARIES})
--set(${ONNXIFI_TEST_DRIVER}_libs ${googletest_STATIC_LIBRARIES})
-+set(${UT_NAME}_libs ${GTEST_LIBRARIES})
-+set(${ONNXIFI_TEST_DRIVER}_libs ${GTEST_LIBRARIES})
-
- list(APPEND ${UT_NAME}_libs onnx)
- list(APPEND ${UT_NAME}_libs onnx_proto)
-@@ -31,10 +31,10 @@ function(AddTest)
- list(REMOVE_DUPLICATES _UT_SOURCES)
-
- add_executable(${_UT_TARGET} ${_UT_SOURCES})
-- add_dependencies(${_UT_TARGET} onnx onnx_proto googletest)
-+ add_dependencies(${_UT_TARGET} onnx onnx_proto)
-
- target_include_directories(${_UT_TARGET}
-- PUBLIC ${googletest_INCLUDE_DIRS}
-+ PUBLIC ${GTEST_INCLUDE_DIRS}
- ${ONNX_INCLUDE_DIRS}
- ${PROTOBUF_INCLUDE_DIRS}
- ${ONNX_ROOT}