From 7c77787c84260bc31e1d72f738a42bb3792b17f6 Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Thu, 25 Nov 2010 08:42:12 +0000 Subject: [PATCH] npp version check --- modules/gpu/src/precomp.hpp | 6 ++++++ samples/gpu/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/gpu/src/precomp.hpp b/modules/gpu/src/precomp.hpp index 53740acc46..a0ec26aace 100644 --- a/modules/gpu/src/precomp.hpp +++ b/modules/gpu/src/precomp.hpp @@ -67,6 +67,12 @@ #include "opencv2/gpu/stream_accessor.hpp" #include "npp.h" +#define NPP_MINIMUM_REQUIRED_VERSION 3216 + +#if (NPP_VERSION_MAJOR*1000+NPP_VERSION_MINOR*100+NPP_VERSION_BUILD < NPP_MINIMUM_REQUIRED_VERSION) + #error "Insufficient NPP version, please update it." +#endif + #else /* defined(HAVE_CUDA) */ static inline void throw_nogpu() { CV_Error(CV_GpuNotSupported, "The library is compilled without GPU support"); } diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index 041c0cf27a..eb73fdd5d8 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -27,7 +27,7 @@ if (BUILD_EXAMPLES) set(the_target "example_gpu_${name}") add_executable(${the_target} ${srcs}) set_target_properties(${the_target} PROPERTIES - OUTPUT_NAME "${name}" + OUTPUT_NAME "${name}_gpu" PROJECT_LABEL "(EXAMPLE_GPU) ${name}") add_dependencies(${the_target} opencv_core opencv_flann opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_objdetect opencv_features2d -- GitLab