From 22a30af3535bcc23ca7de3eb72560e65c0e63b16 Mon Sep 17 00:00:00 2001 From: Maxim Kostin Date: Fri, 13 Feb 2015 19:11:46 +0300 Subject: [PATCH] Fixing buildbot job: - explicitly turning OCL off since WinRT does not support it - fixing macro definitions in core/ocl.cpp Signed-off-by: Maxim Kostin --- cmake/OpenCVDetectOpenCL.cmake | 9 ++++++++- modules/core/src/ocl.cpp | 2 -- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmake/OpenCVDetectOpenCL.cmake b/cmake/OpenCVDetectOpenCL.cmake index ce76ad1732..67e10ede89 100644 --- a/cmake/OpenCVDetectOpenCL.cmake +++ b/cmake/OpenCVDetectOpenCL.cmake @@ -10,6 +10,11 @@ else(APPLE) set(OPENCL_INCLUDE_DIR "${OpenCV_SOURCE_DIR}/3rdparty/include/opencl/1.2") endif(APPLE) +if(WINRT) + set(OPENCL_FOUND NO) + set(HAVE_OPENCL_STATIC OFF) +endif(WINRT) + if(OPENCL_FOUND) if(NOT HAVE_OPENCL_STATIC) try_compile(__VALID_OPENCL @@ -24,7 +29,9 @@ if(OPENCL_FOUND) endif() endif() - set(HAVE_OPENCL 1) + if(NOT WINRT) + set(HAVE_OPENCL 1) + endif() if(WITH_OPENCL_SVM) set(HAVE_OPENCL_SVM 1) diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp index 094d87a40c..6a36ddbae3 100644 --- a/modules/core/src/ocl.cpp +++ b/modules/core/src/ocl.cpp @@ -2198,7 +2198,6 @@ inline cl_int getStringInfo(Functor f, ObjectType obj, cl_uint name, std::string return CL_SUCCESS; } -#ifdef HAVE_OPENCL static void split(const std::string &s, char delim, std::vector &elems) { elems.clear(); @@ -2239,7 +2238,6 @@ static bool parseOpenCLDeviceConfiguration(const std::string& configurationStr, } return true; } -#endif #ifdef WINRT static cl_device_id selectOpenCLDevice()