From c7c987843ca341f7d534eaae9922d61c0af1e06d Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 28 Mar 2019 16:51:11 +0300 Subject: [PATCH] cmake: emit error if CUDA is enabled without opencv_contrib --- modules/core/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt index c11eec4077..8f5daf7302 100644 --- a/modules/core/CMakeLists.txt +++ b/modules/core/CMakeLists.txt @@ -35,6 +35,9 @@ if(DEFINED WINRT AND NOT DEFINED ENABLE_WINRT_MODE_NATIVE) endif() if(HAVE_CUDA) + if(NOT TARGET opencv_cudev) + message(FATAL_ERROR "CUDA: OpenCV requires enabled 'cudev' module from 'opencv_contrib' repository: https://github.com/opencv/opencv_contrib") + endif() ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wenum-compare -Wunused-function -Wshadow) endif()