microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
cmake/externals/opencv-no-rtti.patch
58lines · modecode
| 1 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 2 | index d95e5db1..db185453 100644 |
| 3 | --- a/CMakeLists.txt |
| 4 | +++ b/CMakeLists.txt |
| 5 | @@ -617,11 +617,6 @@ endif() |
| 6 | |
| 7 | ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS) |
| 8 | |
| 9 | -# --- Python Support --- |
| 10 | -if(NOT IOS) |
| 11 | - include(cmake/OpenCVDetectPython.cmake) |
| 12 | -endif() |
| 13 | - |
| 14 | include(cmake/OpenCVCompilerOptions.cmake) |
| 15 | |
| 16 | ocv_cmake_hook(POST_COMPILER_OPTIONS) |
| 17 | diff --git a/modules/core/include/opencv2/core/ocl.hpp b/modules/core/include/opencv2/core/ocl.hpp |
| 18 | index 4503fa00..642b0508 100644 |
| 19 | --- a/modules/core/include/opencv2/core/ocl.hpp |
| 20 | +++ b/modules/core/include/opencv2/core/ocl.hpp |
| 21 | @@ -302,21 +302,6 @@ public: |
| 22 | |
| 23 | void release(); |
| 24 | |
| 25 | - class CV_EXPORTS UserContext { |
| 26 | - public: |
| 27 | - virtual ~UserContext(); |
| 28 | - }; |
| 29 | - template <typename T> |
| 30 | - inline void setUserContext(const std::shared_ptr<T>& userContext) { |
| 31 | - setUserContext(typeid(T), userContext); |
| 32 | - } |
| 33 | - template <typename T> |
| 34 | - inline std::shared_ptr<T> getUserContext() { |
| 35 | - return std::dynamic_pointer_cast<T>(getUserContext(typeid(T))); |
| 36 | - } |
| 37 | - void setUserContext(std::type_index typeId, const std::shared_ptr<UserContext>& userContext); |
| 38 | - std::shared_ptr<UserContext> getUserContext(std::type_index typeId); |
| 39 | - |
| 40 | struct Impl; |
| 41 | inline Impl* getImpl() const { return (Impl*)p; } |
| 42 | inline bool empty() const { return !p; } |
| 43 | diff --git a/modules/core/src/ocl_disabled.impl.hpp b/modules/core/src/ocl_disabled.impl.hpp |
| 44 | index a217979a..0ba30d02 100644 |
| 45 | --- a/modules/core/src/ocl_disabled.impl.hpp |
| 46 | +++ b/modules/core/src/ocl_disabled.impl.hpp |
| 47 | @@ -177,11 +177,6 @@ void* Context::getOpenCLContextProperty(int /*propertyId*/) const { OCL_NOT_AVAI |
| 48 | bool Context::useSVM() const { return false; } |
| 49 | void Context::setUseSVM(bool enabled) { } |
| 50 | |
| 51 | -Context::UserContext::~UserContext() { } |
| 52 | - |
| 53 | -void Context::setUserContext(std::type_index /*typeId*/, const std::shared_ptr<Context::UserContext>& /*userContext*/) { OCL_NOT_AVAILABLE(); } |
| 54 | -std::shared_ptr<Context::UserContext> Context::getUserContext(std::type_index /*typeId*/) { OCL_NOT_AVAILABLE(); } |
| 55 | - |
| 56 | /* static */ Context Context::fromHandle(void* context) { OCL_NOT_AVAILABLE(); } |
| 57 | /* static */ Context Context::fromDevice(const ocl::Device& device) { OCL_NOT_AVAILABLE(); } |
| 58 | /* static */ Context Context::create(const std::string& configuration) { OCL_NOT_AVAILABLE(); } |
| 59 | |