From 9f33de7071b83c20088c163f3cfb594a80219b04 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Mon, 19 Aug 2013 12:46:57 +0400 Subject: [PATCH] added cvconfig.hpp header file to gpu tests it uses HAVE_CUDA, HAVE_NVCUVID, etc. macroses --- modules/cudev/test/test_precomp.hpp | 2 ++ modules/gpu/test/test_precomp.hpp | 2 ++ modules/gpuarithm/test/test_precomp.hpp | 2 ++ modules/gpubgsegm/test/test_precomp.hpp | 1 + modules/gpucodec/test/test_precomp.hpp | 2 ++ modules/gpufeatures2d/test/test_precomp.hpp | 2 ++ modules/gpufilters/test/test_precomp.hpp | 2 ++ modules/gpuimgproc/test/test_precomp.hpp | 2 ++ modules/gpulegacy/test/test_precomp.hpp | 2 ++ modules/gpuoptflow/test/test_precomp.hpp | 2 ++ modules/gpustereo/test/test_precomp.hpp | 2 ++ modules/gpuwarping/test/test_precomp.hpp | 2 ++ modules/nonfree/perf/perf_precomp.hpp | 1 + modules/nonfree/test/test_precomp.hpp | 1 + modules/photo/test/test_denoising_gpu.cpp | 1 + modules/softcascade/test/test_cuda_softcascade.cpp | 2 +- modules/softcascade/test/test_precomp.hpp | 11 ++++++----- modules/superres/test/test_precomp.hpp | 1 + modules/superres/test/test_superres.cpp | 6 +++++- modules/ts/include/opencv2/ts/gpu_perf.hpp | 1 + modules/ts/include/opencv2/ts/gpu_test.hpp | 1 + 21 files changed, 41 insertions(+), 7 deletions(-) diff --git a/modules/cudev/test/test_precomp.hpp b/modules/cudev/test/test_precomp.hpp index b2ed2d034..18e7cc1ce 100644 --- a/modules/cudev/test/test_precomp.hpp +++ b/modules/cudev/test/test_precomp.hpp @@ -52,4 +52,6 @@ #include "opencv2/ts.hpp" #include "opencv2/ts/gpu_test.hpp" +#include "cvconfig.h" + #endif diff --git a/modules/gpu/test/test_precomp.hpp b/modules/gpu/test/test_precomp.hpp index f2b0bf405..0a9c1df3d 100644 --- a/modules/gpu/test/test_precomp.hpp +++ b/modules/gpu/test/test_precomp.hpp @@ -62,4 +62,6 @@ #include "opencv2/calib3d.hpp" #include "opencv2/objdetect.hpp" +#include "cvconfig.h" + #endif diff --git a/modules/gpuarithm/test/test_precomp.hpp b/modules/gpuarithm/test/test_precomp.hpp index d25aa0c26..faa0f5adb 100644 --- a/modules/gpuarithm/test/test_precomp.hpp +++ b/modules/gpuarithm/test/test_precomp.hpp @@ -60,4 +60,6 @@ #include "opencv2/core.hpp" #include "opencv2/imgproc.hpp" +#include "cvconfig.h" + #endif diff --git a/modules/gpubgsegm/test/test_precomp.hpp b/modules/gpubgsegm/test/test_precomp.hpp index 9422c2a80..783e9e64c 100644 --- a/modules/gpubgsegm/test/test_precomp.hpp +++ b/modules/gpubgsegm/test/test_precomp.hpp @@ -60,5 +60,6 @@ #include "opencv2/video.hpp" #include "opencv2/opencv_modules.hpp" +#include "cvconfig.h" #endif diff --git a/modules/gpucodec/test/test_precomp.hpp b/modules/gpucodec/test/test_precomp.hpp index 0dc79935d..95e70d46d 100644 --- a/modules/gpucodec/test/test_precomp.hpp +++ b/modules/gpucodec/test/test_precomp.hpp @@ -57,4 +57,6 @@ #include "opencv2/gpucodec.hpp" #include "opencv2/highgui.hpp" +#include "cvconfig.h" + #endif diff --git a/modules/gpufeatures2d/test/test_precomp.hpp b/modules/gpufeatures2d/test/test_precomp.hpp index 7725d3f3d..4ce8f7849 100644 --- a/modules/gpufeatures2d/test/test_precomp.hpp +++ b/modules/gpufeatures2d/test/test_precomp.hpp @@ -57,4 +57,6 @@ #include "opencv2/gpufeatures2d.hpp" #include "opencv2/features2d.hpp" +#include "cvconfig.h" + #endif diff --git a/modules/gpufilters/test/test_precomp.hpp b/modules/gpufilters/test/test_precomp.hpp index 95984929f..7dfe713d3 100644 --- a/modules/gpufilters/test/test_precomp.hpp +++ b/modules/gpufilters/test/test_precomp.hpp @@ -57,4 +57,6 @@ #include "opencv2/gpufilters.hpp" #include "opencv2/imgproc.hpp" +#include "cvconfig.h" + #endif diff --git a/modules/gpuimgproc/test/test_precomp.hpp b/modules/gpuimgproc/test/test_precomp.hpp index 71ba4020c..7a8b1cbcd 100644 --- a/modules/gpuimgproc/test/test_precomp.hpp +++ b/modules/gpuimgproc/test/test_precomp.hpp @@ -57,4 +57,6 @@ #include "opencv2/gpuimgproc.hpp" #include "opencv2/imgproc.hpp" +#include "cvconfig.h" + #endif diff --git a/modules/gpulegacy/test/test_precomp.hpp b/modules/gpulegacy/test/test_precomp.hpp index 90485a90a..e1f2d5def 100644 --- a/modules/gpulegacy/test/test_precomp.hpp +++ b/modules/gpulegacy/test/test_precomp.hpp @@ -74,6 +74,8 @@ #include "opencv2/core/private.gpu.hpp" +#include "cvconfig.h" + #include "NCVTest.hpp" #include "NCVAutoTestLister.hpp" #include "NCVTestSourceProvider.hpp" diff --git a/modules/gpuoptflow/test/test_precomp.hpp b/modules/gpuoptflow/test/test_precomp.hpp index 32a7443e8..afac60d87 100644 --- a/modules/gpuoptflow/test/test_precomp.hpp +++ b/modules/gpuoptflow/test/test_precomp.hpp @@ -59,4 +59,6 @@ #include "opencv2/gpuoptflow.hpp" #include "opencv2/video.hpp" +#include "cvconfig.h" + #endif diff --git a/modules/gpustereo/test/test_precomp.hpp b/modules/gpustereo/test/test_precomp.hpp index d55b1ec0d..eb34fcb56 100644 --- a/modules/gpustereo/test/test_precomp.hpp +++ b/modules/gpustereo/test/test_precomp.hpp @@ -57,4 +57,6 @@ #include "opencv2/gpustereo.hpp" #include "opencv2/calib3d.hpp" +#include "cvconfig.h" + #endif diff --git a/modules/gpuwarping/test/test_precomp.hpp b/modules/gpuwarping/test/test_precomp.hpp index 90a28fe1a..9ac7fc0b8 100644 --- a/modules/gpuwarping/test/test_precomp.hpp +++ b/modules/gpuwarping/test/test_precomp.hpp @@ -57,6 +57,8 @@ #include "opencv2/gpuwarping.hpp" #include "opencv2/imgproc.hpp" +#include "cvconfig.h" + #include "interpolation.hpp" #endif diff --git a/modules/nonfree/perf/perf_precomp.hpp b/modules/nonfree/perf/perf_precomp.hpp index 5e3f3c3cb..e8fad3b7b 100644 --- a/modules/nonfree/perf/perf_precomp.hpp +++ b/modules/nonfree/perf/perf_precomp.hpp @@ -14,6 +14,7 @@ #include "opencv2/highgui.hpp" #include "opencv2/opencv_modules.hpp" +#include "cvconfig.h" #ifdef HAVE_OPENCV_OCL # include "opencv2/nonfree/ocl.hpp" diff --git a/modules/nonfree/test/test_precomp.hpp b/modules/nonfree/test/test_precomp.hpp index 563dad43b..965e651e5 100644 --- a/modules/nonfree/test/test_precomp.hpp +++ b/modules/nonfree/test/test_precomp.hpp @@ -19,6 +19,7 @@ #include "opencv2/ts/gpu_test.hpp" #include "opencv2/opencv_modules.hpp" +#include "cvconfig.h" #ifdef HAVE_OPENCV_OCL # include "opencv2/nonfree/ocl.hpp" diff --git a/modules/photo/test/test_denoising_gpu.cpp b/modules/photo/test/test_denoising_gpu.cpp index caf3b23f2..f8de826f2 100644 --- a/modules/photo/test/test_denoising_gpu.cpp +++ b/modules/photo/test/test_denoising_gpu.cpp @@ -46,6 +46,7 @@ #include "opencv2/ts/gpu_test.hpp" #include "opencv2/opencv_modules.hpp" +#include "cvconfig.h" #if defined (HAVE_CUDA) && defined(HAVE_OPENCV_GPUARITHM) && defined(HAVE_OPENCV_GPUIMGPROC) diff --git a/modules/softcascade/test/test_cuda_softcascade.cpp b/modules/softcascade/test/test_cuda_softcascade.cpp index 4d97f9208..5973d25f2 100644 --- a/modules/softcascade/test/test_cuda_softcascade.cpp +++ b/modules/softcascade/test/test_cuda_softcascade.cpp @@ -313,4 +313,4 @@ INSTANTIATE_TEST_CASE_P(cuda_accelerated, SCascadeTestAll, testing::Combine( ALL testing::Values(Fixture("cascades/inria_caltech-17.01.2013.xml", 7), Fixture("cascades/sc_cvpr_2012_to_opencv_new_format.xml", 1291)))); -#endif \ No newline at end of file +#endif diff --git a/modules/softcascade/test/test_precomp.hpp b/modules/softcascade/test/test_precomp.hpp index 80bff6536..4a3974478 100644 --- a/modules/softcascade/test/test_precomp.hpp +++ b/modules/softcascade/test/test_precomp.hpp @@ -51,10 +51,11 @@ #ifndef __OPENCV_TEST_PRECOMP_HPP__ #define __OPENCV_TEST_PRECOMP_HPP__ -# include "opencv2/ts.hpp" -# include "opencv2/softcascade.hpp" -# include "opencv2/imgproc.hpp" -# include "opencv2/highgui.hpp" -# include "utility.hpp" +#include "opencv2/ts.hpp" +#include "opencv2/softcascade.hpp" +#include "opencv2/imgproc.hpp" +#include "opencv2/highgui.hpp" +#include "cvconfig.h" +#include "utility.hpp" #endif diff --git a/modules/superres/test/test_precomp.hpp b/modules/superres/test/test_precomp.hpp index 4ef73030b..47334e324 100644 --- a/modules/superres/test/test_precomp.hpp +++ b/modules/superres/test/test_precomp.hpp @@ -56,6 +56,7 @@ #include "opencv2/imgproc.hpp" #include "opencv2/ts.hpp" #include "opencv2/superres.hpp" +#include "cvconfig.h" #include "input_array_utility.hpp" #endif diff --git a/modules/superres/test/test_superres.cpp b/modules/superres/test/test_superres.cpp index 445dd3a01..2cede096d 100644 --- a/modules/superres/test/test_superres.cpp +++ b/modules/superres/test/test_superres.cpp @@ -274,12 +274,16 @@ TEST_F(SuperResolution, BTVL1_GPU) { RunTest(cv::superres::createSuperResolution_BTVL1_GPU()); } + #endif + #if defined(HAVE_OPENCV_OCL) && defined(HAVE_OPENCL) + TEST_F(SuperResolution, BTVL1_OCL) { std::vector infos; cv::ocl::getDevice(infos); RunTest(cv::superres::createSuperResolution_BTVL1_OCL()); } -#endif + +#endif diff --git a/modules/ts/include/opencv2/ts/gpu_perf.hpp b/modules/ts/include/opencv2/ts/gpu_perf.hpp index abc17e994..8f1ba8abc 100644 --- a/modules/ts/include/opencv2/ts/gpu_perf.hpp +++ b/modules/ts/include/opencv2/ts/gpu_perf.hpp @@ -47,6 +47,7 @@ #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/ts/ts_perf.hpp" +#include "cvconfig.h" namespace perf { diff --git a/modules/ts/include/opencv2/ts/gpu_test.hpp b/modules/ts/include/opencv2/ts/gpu_test.hpp index dab5fd3b9..2ff2ca0bf 100644 --- a/modules/ts/include/opencv2/ts/gpu_test.hpp +++ b/modules/ts/include/opencv2/ts/gpu_test.hpp @@ -44,6 +44,7 @@ #define __OPENCV_GPU_TEST_UTILITY_HPP__ #include +#include "cvconfig.h" #include "opencv2/core.hpp" #include "opencv2/core/gpu.hpp" #include "opencv2/highgui.hpp"