Implicit CUDA and OpenCL control for module definition added.
Feature allows to exclude CUDA or OpenCL optimizations at all even CUDA is used on build. Exclusion of CUDA or OpenCL cut unwanted dependencies.
This commit is contained in:
@@ -6,7 +6,7 @@ set(the_description "Functionality with possible limitations on the use")
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wshadow)
|
||||
if(ENABLE_DYNAMIC_CUDA)
|
||||
add_definitions(-DDYNAMIC_CUDA_SUPPORT)
|
||||
ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_ocl)
|
||||
ocv_define_module(nonfree EXCLUDE_CUDA opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_ocl)
|
||||
else()
|
||||
ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_gpu opencv_ocl)
|
||||
endif()
|
||||
|
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
|
||||
#ifdef HAVE_OPENCV_GPU
|
||||
#if defined(HAVE_OPENCV_GPU) && !defined(DYNAMIC_CUDA_SUPPORT)
|
||||
|
||||
#include "opencv2/gpu/device/common.hpp"
|
||||
#include "opencv2/gpu/device/transform.hpp"
|
||||
|
@@ -11,7 +11,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
|
||||
|
||||
ocv_add_module(ts opencv_core opencv_features2d)
|
||||
|
||||
ocv_glob_module_sources()
|
||||
ocv_glob_module_sources(0 0)
|
||||
ocv_module_include_directories()
|
||||
ocv_create_module()
|
||||
|
||||
|
Reference in New Issue
Block a user