Skip to content

Commit

Permalink
fix nonfree module compilation without CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Vinogradov committed Feb 7, 2014
1 parent 34b02f6 commit 3e1f74f
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions modules/nonfree/src/precomp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,14 @@
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/core/internal.hpp"

#if defined(HAVE_OPENCV_GPU) && !defined(DYNAMIC_CUDA_SUPPORT)
#include "opencv2/nonfree/gpu.hpp"
#include "opencv2/nonfree/gpu.hpp"

#if defined(HAVE_CUDA)
#include "opencv2/gpu/stream_accessor.hpp"
#include "opencv2/gpu/device/common.hpp"

static inline void throw_nogpu() { CV_Error(CV_StsNotImplemented, "The called functionality is disabled for current build or platform"); }
#else
static inline void throw_nogpu() { CV_Error(CV_GpuNotSupported, "The library is compiled without GPU support"); }
#endif
#if defined(HAVE_CUDA) && defined(HAVE_OPENCV_GPU) && !defined(DYNAMIC_CUDA_SUPPORT)
#include "opencv2/gpu/stream_accessor.hpp"
#include "opencv2/gpu/device/common.hpp"
static inline void throw_nogpu() { CV_Error(CV_StsNotImplemented, "The called functionality is disabled for current build or platform"); }
#else
static inline void throw_nogpu() { CV_Error(CV_GpuNotSupported, "The library is compiled without GPU support"); }
#endif

#ifdef HAVE_OPENCV_OCL
Expand Down

0 comments on commit 3e1f74f

Please sign in to comment.