File onnxruntime-python-and-Wno-error.patch of Package onnxruntime
--- /tmp/onnxruntime-1.16.3/cmake/CMakeLists.txt 2023-11-17 20:58:21.000000000 -0800
+++ ./onnxruntime-1.16.3/cmake/CMakeLists.txt 2024-02-08 20:27:17.341710142 -0800
@@ -531,12 +531,12 @@
if (onnxruntime_BUILD_SHARED_LIB OR onnxruntime_ENABLE_PYTHON)
if (onnxruntime_ENABLE_PYTHON)
if (onnxruntime_ENABLE_LANGUAGE_INTEROP_OPS OR onnxruntime_REQUIRE_PYTHON_EMBED_LIB)
- find_package(Python 3.8 COMPONENTS Interpreter Development NumPy)
+ find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development NumPy)
else()
- find_package(Python 3.8 COMPONENTS Interpreter Development.Module NumPy)
+ find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development.Module NumPy)
endif()
else()
- find_package(Python 3.8 COMPONENTS Interpreter)
+ find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter)
endif()
endif()
@@ -612,6 +612,7 @@
check_cxx_compiler_flag(-Wunused-but-set-variable HAS_UNUSED_BUT_SET_VARIABLE)
check_cxx_compiler_flag(-Wunused-variable HAS_UNUSED_VARIABLE)
check_cxx_compiler_flag(-Wuseless-cast HAS_USELESS_CAST)
+ check_cxx_compiler_flag(-Wstringop-overflow HAS_STRINGOP_OVERFLOW)
check_function_exists(reallocarray HAS_REALLOCARRAY)
if (HAS_TAUTOLOGICAL_POINTER_COMPARE)