From d34717d8c9759f15b3920f428b7616c418e0511c Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sun, 4 Oct 2020 15:11:55 +0000 Subject: [PATCH] core: allow to disable including of unsupported/Eigen/CXX11/Tensor - define OPENCV_DISABLE_EIGEN_TENSOR_SUPPORT --- modules/core/include/opencv2/core/eigen.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/core/include/opencv2/core/eigen.hpp b/modules/core/include/opencv2/core/eigen.hpp index 3f4be931e6..51f41474bd 100644 --- a/modules/core/include/opencv2/core/eigen.hpp +++ b/modules/core/include/opencv2/core/eigen.hpp @@ -58,11 +58,13 @@ #pragma warning( disable: 4244 ) //conversion from '__int64' to 'int', possible loss of data #endif +#if !defined(OPENCV_DISABLE_EIGEN_TENSOR_SUPPORT) #if EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 3 \ && defined(CV_CXX11) && defined(CV_CXX_STD_ARRAY) #include -#define OPENCV_EIGEN_TENSOR_SUPPORT -#endif // EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 3 +#define OPENCV_EIGEN_TENSOR_SUPPORT 1 +#endif // EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 3 +#endif // !defined(OPENCV_DISABLE_EIGEN_TENSOR_SUPPORT) namespace cv {