microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
cmake/externals/opencv-no-rtti.patch
83lines · modecode
| 1 | diff --git a/3rdparty/libjpeg-turbo/CMakeLists.txt b/3rdparty/libjpeg-turbo/CMakeLists.txt |
| 2 | index 3c7f29b08e..066ea4e545 100644 |
| 3 | --- a/3rdparty/libjpeg-turbo/CMakeLists.txt |
| 4 | +++ b/3rdparty/libjpeg-turbo/CMakeLists.txt |
| 5 | @@ -67,7 +67,7 @@ set(JPEG_LIB_VERSION "${VERSION}-${JPEG_LIB_VERSION}" PARENT_SCOPE) |
| 6 | set(THREAD_LOCAL "") # WITH_TURBOJPEG is not used |
| 7 | |
| 8 | if(MSVC) |
| 9 | - add_definitions(-W3 -wd4996 -wd4018) |
| 10 | + add_definitions(-W3) |
| 11 | endif() |
| 12 | |
| 13 | if(WIN32) |
| 14 | diff --git a/3rdparty/zlib/CMakeLists.txt b/3rdparty/zlib/CMakeLists.txt |
| 15 | index 9758861a6b..9e654ba922 100644 |
| 16 | --- a/3rdparty/zlib/CMakeLists.txt |
| 17 | +++ b/3rdparty/zlib/CMakeLists.txt |
| 18 | @@ -81,7 +81,6 @@ set_target_properties(${ZLIB_LIBRARY} PROPERTIES DEFINE_SYMBOL ZLIB_DLL) |
| 19 | |
| 20 | ocv_warnings_disable(CMAKE_C_FLAGS -Wshorten-64-to-32 -Wattributes -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshift-negative-value |
| 21 | -Wundef # _LFS64_LARGEFILE is not defined |
| 22 | - /wd4267 # MSVS 2015 (x64) + zlib 1.2.11 |
| 23 | -Wimplicit-fallthrough |
| 24 | ) |
| 25 | |
| 26 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 27 | index d95e5db163..db185453df 100644 |
| 28 | --- a/CMakeLists.txt |
| 29 | +++ b/CMakeLists.txt |
| 30 | @@ -617,11 +617,6 @@ endif() |
| 31 | |
| 32 | ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS) |
| 33 | |
| 34 | -# --- Python Support --- |
| 35 | -if(NOT IOS) |
| 36 | - include(cmake/OpenCVDetectPython.cmake) |
| 37 | -endif() |
| 38 | - |
| 39 | include(cmake/OpenCVCompilerOptions.cmake) |
| 40 | |
| 41 | ocv_cmake_hook(POST_COMPILER_OPTIONS) |
| 42 | diff --git a/modules/core/include/opencv2/core/ocl.hpp b/modules/core/include/opencv2/core/ocl.hpp |
| 43 | index 4503fa00dd..642b0508d0 100644 |
| 44 | --- a/modules/core/include/opencv2/core/ocl.hpp |
| 45 | +++ b/modules/core/include/opencv2/core/ocl.hpp |
| 46 | @@ -302,21 +302,6 @@ public: |
| 47 | |
| 48 | void release(); |
| 49 | |
| 50 | - class CV_EXPORTS UserContext { |
| 51 | - public: |
| 52 | - virtual ~UserContext(); |
| 53 | - }; |
| 54 | - template <typename T> |
| 55 | - inline void setUserContext(const std::shared_ptr<T>& userContext) { |
| 56 | - setUserContext(typeid(T), userContext); |
| 57 | - } |
| 58 | - template <typename T> |
| 59 | - inline std::shared_ptr<T> getUserContext() { |
| 60 | - return std::dynamic_pointer_cast<T>(getUserContext(typeid(T))); |
| 61 | - } |
| 62 | - void setUserContext(std::type_index typeId, const std::shared_ptr<UserContext>& userContext); |
| 63 | - std::shared_ptr<UserContext> getUserContext(std::type_index typeId); |
| 64 | - |
| 65 | struct Impl; |
| 66 | inline Impl* getImpl() const { return (Impl*)p; } |
| 67 | inline bool empty() const { return !p; } |
| 68 | diff --git a/modules/core/src/ocl_disabled.impl.hpp b/modules/core/src/ocl_disabled.impl.hpp |
| 69 | index a217979a1e..0ba30d024c 100644 |
| 70 | --- a/modules/core/src/ocl_disabled.impl.hpp |
| 71 | +++ b/modules/core/src/ocl_disabled.impl.hpp |
| 72 | @@ -177,11 +177,6 @@ void* Context::getOpenCLContextProperty(int /*propertyId*/) const { OCL_NOT_AVAI |
| 73 | bool Context::useSVM() const { return false; } |
| 74 | void Context::setUseSVM(bool enabled) { } |
| 75 | |
| 76 | -Context::UserContext::~UserContext() { } |
| 77 | - |
| 78 | -void Context::setUserContext(std::type_index /*typeId*/, const std::shared_ptr<Context::UserContext>& /*userContext*/) { OCL_NOT_AVAILABLE(); } |
| 79 | -std::shared_ptr<Context::UserContext> Context::getUserContext(std::type_index /*typeId*/) { OCL_NOT_AVAILABLE(); } |
| 80 | - |
| 81 | /* static */ Context Context::fromHandle(void* context) { OCL_NOT_AVAILABLE(); } |
| 82 | /* static */ Context Context::fromDevice(const ocl::Device& device) { OCL_NOT_AVAILABLE(); } |
| 83 | /* static */ Context Context::create(const std::string& configuration) { OCL_NOT_AVAILABLE(); } |
| 84 | |