From ac2e61397503b55ba6f709deb6469d95b69a7aa1 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 20 Jan 2014 17:52:32 +0400 Subject: [PATCH] skip OCL tests if OpenCL isn't available --- modules/superres/test/test_precomp.hpp | 4 ++-- modules/superres/test/test_superres.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/superres/test/test_precomp.hpp b/modules/superres/test/test_precomp.hpp index 47334e324..553481818 100644 --- a/modules/superres/test/test_precomp.hpp +++ b/modules/superres/test/test_precomp.hpp @@ -52,9 +52,9 @@ #define __OPENCV_TEST_PRECOMP_HPP__ #include "opencv2/opencv_modules.hpp" -#include "opencv2/core.hpp" -#include "opencv2/imgproc.hpp" +#include "opencv2/core/ocl.hpp" #include "opencv2/ts.hpp" +#include "opencv2/imgproc.hpp" #include "opencv2/superres.hpp" #include "cvconfig.h" #include "input_array_utility.hpp" diff --git a/modules/superres/test/test_superres.cpp b/modules/superres/test/test_superres.cpp index 95baefda9..92d51fd9a 100644 --- a/modules/superres/test/test_superres.cpp +++ b/modules/superres/test/test_superres.cpp @@ -282,7 +282,8 @@ TEST_F(SuperResolution, BTVL1_CUDA) TEST_F(SuperResolution, BTVL1_OCL) { - RunTest(cv::superres::createSuperResolution_BTVL1_OCL()); + if (cv::ocl::useOpenCL()) + RunTest(cv::superres::createSuperResolution_BTVL1_OCL()); } #endif