[opencv] 58/89: ipp: disable compilation with IPP 9+

Nobuhiro Iwamatsu iwamatsu at moszumanska.debian.org
Sat May 13 09:57:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

iwamatsu pushed a commit to annotated tag 2.4.13.2
in repository opencv.

commit 2d28bb41711365c98c8b4b7f60ad979d292b376f
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date:   Tue Nov 29 00:54:15 2016 +0300

    ipp: disable compilation with IPP 9+
---
 cmake/OpenCVFindIPP.cmake                      | 17 ++++++++---------
 modules/core/include/opencv2/core/internal.hpp |  4 ++++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/cmake/OpenCVFindIPP.cmake b/cmake/OpenCVFindIPP.cmake
index db02e6a..a944b84 100644
--- a/cmake/OpenCVFindIPP.cmake
+++ b/cmake/OpenCVFindIPP.cmake
@@ -85,8 +85,6 @@ function(get_ipp_version _ROOT_DIR)
     message(STATUS "found IPP: ${_MAJOR}.${_MINOR}.${_BUILD} [${_VERSION_STR}]")
     message(STATUS "at: ${_ROOT_DIR}")
 
-    return()
-
 endfunction()
 
 
@@ -129,8 +127,6 @@ function(set_ipp_old_libraries)
         ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_ARCH}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
         PARENT_SCOPE)
 
-    return()
-
 endfunction()
 
 
@@ -173,7 +169,6 @@ function(set_ipp_new_libraries _LATEST_VERSION)
             ${IPP_LIB_PREFIX}svml${CMAKE_SHARED_LIBRARY_SUFFIX})
     endif()
     set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE)
-    return()
 
 endfunction()
 
@@ -208,7 +203,7 @@ function(set_ipp_variables _LATEST_VERSION)
         set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE)
         message(STATUS "IPP libs: ${IPP_LIBRARIES}")
 
-    else()
+    elseif(${_LATEST_VERSION} VERSION_LESS "9.0")
 #        message(STATUS "new")
 
         # set INCLUDE and LIB folders
@@ -229,7 +224,10 @@ function(set_ipp_variables _LATEST_VERSION)
         endif()
 
         if (UNIX)
-            get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../lib REALPATH)
+            get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../compiler/lib REALPATH)
+            if(NOT EXISTS "${INTEL_COMPILER_LIBRARY_DIR}")
+              get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../lib REALPATH)
+            endif()
             if (IPP_X64)
                 if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/intel64)
                     message(SEND_ERROR "Intel compiler EM64T libraries not found")
@@ -253,10 +251,11 @@ function(set_ipp_variables _LATEST_VERSION)
         set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE)
         message(STATUS "IPP libs: ${IPP_LIBRARIES}")
 
+    else()
+        message(STATUS "IPP: version ${_LATEST_VERSION} is not supported (${IPP_ROOT_DIR})")
+        set(IPP_FOUND 0 PARENT_SCOPE)
     endif()
 
-    return()
-
 endfunction()
 
 
diff --git a/modules/core/include/opencv2/core/internal.hpp b/modules/core/include/opencv2/core/internal.hpp
index 4933654..4ebc3a0 100644
--- a/modules/core/include/opencv2/core/internal.hpp
+++ b/modules/core/include/opencv2/core/internal.hpp
@@ -104,6 +104,10 @@ CV_INLINE IppiSize ippiSize(const cv::Size & _size)
     return size;
 }
 
+#if IPP_VERSION_MAJOR >= 9 // IPP 9+ is not supported
+#undef HAVE_IPP
+#undef IPP_VERSION_MAJOR
+#endif
 #endif
 
 #ifndef IPPI_CALL

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list