From 3cc234588abc3064cf0d5d3113d9bbb75b6a54cf Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 25 Feb 2016 11:04:23 +0300 Subject: [PATCH] Added build warnings in case of macro definition conflicts --- modules/core/include/opencv2/core/utility.hpp | 4 ++++ modules/stitching/include/opencv2/stitching/detail/blenders.hpp | 4 ++++ .../include/opencv2/stitching/detail/exposure_compensate.hpp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/modules/core/include/opencv2/core/utility.hpp b/modules/core/include/opencv2/core/utility.hpp index b66ade5..1e6249d 100644 --- a/modules/core/include/opencv2/core/utility.hpp +++ b/modules/core/include/opencv2/core/utility.hpp @@ -49,6 +49,10 @@ # error utility.hpp header must be compiled as C++ #endif +#if defined(check) +# warning Detected Apple 'check' macro definition, it can cause build conflicts. Please, include this header before any Apple headers. +#endif + #include "opencv2/core.hpp" namespace cv diff --git a/modules/stitching/include/opencv2/stitching/detail/blenders.hpp b/modules/stitching/include/opencv2/stitching/detail/blenders.hpp index 0e60725..3d20036 100644 --- a/modules/stitching/include/opencv2/stitching/detail/blenders.hpp +++ b/modules/stitching/include/opencv2/stitching/detail/blenders.hpp @@ -43,6 +43,10 @@ #ifndef __OPENCV_STITCHING_BLENDERS_HPP__ #define __OPENCV_STITCHING_BLENDERS_HPP__ +#if defined(NO) +# warning Detected Apple 'NO' macro definition, it can cause build conflicts. Please, include this header before any Apple headers. +#endif + #include "opencv2/core.hpp" namespace cv { diff --git a/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp b/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp index ef64e12..7855956 100644 --- a/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp +++ b/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp @@ -43,6 +43,10 @@ #ifndef __OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP__ #define __OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP__ +#if defined(NO) +# warning Detected Apple 'NO' macro definition, it can cause build conflicts. Please, include this header before any Apple headers. +#endif + #include "opencv2/core.hpp" namespace cv { -- 2.7.4