Skip to content

Commit a8aa9d5

Browse files
committed
Merge pull request opencv#17578 from Bleach665:fix_win_eigen_build
2 parents 52fbfb3 + 456e88a commit a8aa9d5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

modules/core/include/opencv2/core/eigen.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,19 @@
5151

5252
#include "opencv2/core.hpp"
5353

54-
#if EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 3 \
55-
&& defined(CV_CXX11) && defined(CV_CXX_STD_ARRAY)
56-
#include <unsupported/Eigen/CXX11/Tensor>
57-
#define OPENCV_EIGEN_TENSOR_SUPPORT
58-
#endif // EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 3
59-
6054
#if defined _MSC_VER && _MSC_VER >= 1200
55+
#define NOMINMAX // fix https://github.com/opencv/opencv/issues/17548
6156
#pragma warning( disable: 4714 ) //__forceinline is not inlined
6257
#pragma warning( disable: 4127 ) //conditional expression is constant
6358
#pragma warning( disable: 4244 ) //conversion from '__int64' to 'int', possible loss of data
6459
#endif
6560

61+
#if EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 3 \
62+
&& defined(CV_CXX11) && defined(CV_CXX_STD_ARRAY)
63+
#include <unsupported/Eigen/CXX11/Tensor>
64+
#define OPENCV_EIGEN_TENSOR_SUPPORT
65+
#endif // EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 3
66+
6667
namespace cv
6768
{
6869

0 commit comments

Comments
 (0)