From 2cf34c0fe5493b857f07d86b857a22f72acc8a29 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 3 Sep 2018 23:11:25 +0000 Subject: [PATCH] dnn: fix tests build with disabled OpenCL --- modules/dnn/test/test_common.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/dnn/test/test_common.hpp b/modules/dnn/test/test_common.hpp index e5fb5859b6..2df422b759 100644 --- a/modules/dnn/test/test_common.hpp +++ b/modules/dnn/test/test_common.hpp @@ -246,19 +246,23 @@ static testing::internal::ParamGenerator > dnnBackendsAnd if (withHalide) { targets.push_back(make_tuple(DNN_BACKEND_HALIDE, DNN_TARGET_CPU)); +#ifdef HAVE_OPENCL if (cv::ocl::useOpenCL()) targets.push_back(make_tuple(DNN_BACKEND_HALIDE, DNN_TARGET_OPENCL)); +#endif } #endif #ifdef HAVE_INF_ENGINE if (withInferenceEngine) { targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_CPU)); +#ifdef HAVE_OPENCL if (cv::ocl::useOpenCL()) { targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_OPENCL)); targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_OPENCL_FP16)); } +#endif if (checkMyriadTarget()) targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_MYRIAD)); }