From 87498bc6d45345eaeb5e78630106d13407fdef4e Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 26 Mar 2018 17:24:37 +0300 Subject: [PATCH] cmake: workaround CPATH ipp_iw issue CPATH entries are processed before any -isystem: https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html --- 3rdparty/ippicv/CMakeLists.txt | 2 +- cmake/OpenCVFindLibsPerf.cmake | 4 ++-- modules/core/include/opencv2/core/private.hpp | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/3rdparty/ippicv/CMakeLists.txt b/3rdparty/ippicv/CMakeLists.txt index cc7713d353..7931832737 100644 --- a/3rdparty/ippicv/CMakeLists.txt +++ b/3rdparty/ippicv/CMakeLists.txt @@ -4,7 +4,7 @@ # ---------------------------------------------------------------------------- project(${IPP_IW_LIBRARY}) -ocv_include_directories(SYSTEM ${IPP_INCLUDE_DIRS} ${IPP_IW_PATH}/include) +ocv_include_directories(${IPP_INCLUDE_DIRS} ${IPP_IW_PATH}/include) add_definitions(-DIW_BUILD) if(HAVE_IPP_ICV) add_definitions(-DICV_BASE) diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake index 6c88827d3a..5fba24c30b 100644 --- a/cmake/OpenCVFindLibsPerf.cmake +++ b/cmake/OpenCVFindLibsPerf.cmake @@ -13,10 +13,10 @@ if(WITH_IPP) if(HAVE_IPP) include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindIPPIW.cmake") if(HAVE_IPP_IW) - ocv_include_directories(SYSTEM ${IPP_IW_INCLUDES}) + ocv_include_directories(${IPP_IW_INCLUDES}) list(APPEND OPENCV_LINKER_LIBS ${IPP_IW_LIBRARIES}) endif() - ocv_include_directories(SYSTEM ${IPP_INCLUDE_DIRS}) + ocv_include_directories(${IPP_INCLUDE_DIRS}) list(APPEND OPENCV_LINKER_LIBS ${IPP_LIBRARIES}) # Details: #10229 diff --git a/modules/core/include/opencv2/core/private.hpp b/modules/core/include/opencv2/core/private.hpp index 77eb4f9acb..351b95b61d 100644 --- a/modules/core/include/opencv2/core/private.hpp +++ b/modules/core/include/opencv2/core/private.hpp @@ -237,8 +237,15 @@ T* allocSingleton(size_t count) { return static_cast(fastMalloc(sizeof(T) * #include "ipp.h" #endif #ifdef HAVE_IPP_IW +# if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsuggest-override" +# endif #include "iw++/iw.hpp" #include "iw/iw_ll.h" +# if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5 +# pragma GCC diagnostic pop +# endif #endif #if IPP_VERSION_X100 >= 201700