From 499050694818486df97462935d52d59a24bdc87a Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 5 Apr 2018 19:23:58 +0000 Subject: [PATCH] cuda: WITH_CUDA=OFF by default (need to enable it explicitly) --- CMakeLists.txt | 2 +- cmake/OpenCVFindLibsPerf.cmake | 6 ++++++ .../py_setup/py_setup_in_fedora/py_setup_in_fedora.markdown | 2 +- .../introduction/windows_install/windows_install.markdown | 2 +- platforms/android/build_sdk.py | 2 -- platforms/js/build_js.py | 4 ---- platforms/maven/opencv/pom.xml | 1 - 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 657a9207fe..01c91d6a05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,7 +221,7 @@ OCV_OPTION(WITH_CARBON "Use Carbon for UI instead of Cocoa" OFF OCV_OPTION(WITH_CAROTENE "Use NVidia carotene acceleration library for ARM platform" ON IF (ARM OR AARCH64) AND NOT IOS AND NOT (CMAKE_VERSION VERSION_LESS "2.8.11")) OCV_OPTION(WITH_CPUFEATURES "Use cpufeatures Android library" ON IF ANDROID) OCV_OPTION(WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" ON IF (NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT CMAKE_CROSSCOMPILING) ) -OCV_OPTION(WITH_CUDA "Include NVidia Cuda Runtime support" ON IF (NOT IOS AND NOT WINRT) ) +OCV_OPTION(WITH_CUDA "Include NVidia Cuda Runtime support" OFF IF (NOT IOS AND NOT WINRT) ) OCV_OPTION(WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT) library support" ON IF (NOT IOS AND NOT WINRT) ) OCV_OPTION(WITH_CUBLAS "Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support" ON IF (NOT IOS AND NOT WINRT) ) OCV_OPTION(WITH_NVCUVID "Include NVidia Video Decoding library support" ON IF (NOT IOS AND NOT APPLE) ) diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake index 5fba24c30b..59c9c4ffca 100644 --- a/cmake/OpenCVFindLibsPerf.cmake +++ b/cmake/OpenCVFindLibsPerf.cmake @@ -42,6 +42,12 @@ endif(WITH_IPP_A) # --- CUDA --- if(WITH_CUDA) include("${OpenCV_SOURCE_DIR}/cmake/OpenCVDetectCUDA.cmake") + if(NOT HAVE_CUDA) + message(WARNING "OpenCV is not able to find/confidure CUDA SDK (required by WITH_CUDA). +CUDA support will be disabled in OpenCV build. +To eliminate this warning remove WITH_CUDA=ON CMake configuration option. +") + endif() endif(WITH_CUDA) # --- Eigen --- diff --git a/doc/py_tutorials/py_setup/py_setup_in_fedora/py_setup_in_fedora.markdown b/doc/py_tutorials/py_setup/py_setup_in_fedora/py_setup_in_fedora.markdown index bc5386bbdc..ebcc6523ef 100644 --- a/doc/py_tutorials/py_setup/py_setup_in_fedora/py_setup_in_fedora.markdown +++ b/doc/py_tutorials/py_setup/py_setup_in_fedora/py_setup_in_fedora.markdown @@ -160,7 +160,7 @@ understanding.)* @endcode - Disable all GPU related modules. @code{.sh} - cmake -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D BUILD_opencv_gpu=OFF -D BUILD_opencv_gpuarithm=OFF -D BUILD_opencv_gpubgsegm=OFF -D BUILD_opencv_gpucodec=OFF -D BUILD_opencv_gpufeatures2d=OFF -D BUILD_opencv_gpufilters=OFF -D BUILD_opencv_gpuimgproc=OFF -D BUILD_opencv_gpulegacy=OFF -D BUILD_opencv_gpuoptflow=OFF -D BUILD_opencv_gpustereo=OFF -D BUILD_opencv_gpuwarping=OFF .. + cmake -D WITH_OPENCL=OFF -D BUILD_opencv_gpu=OFF -D BUILD_opencv_gpuarithm=OFF -D BUILD_opencv_gpubgsegm=OFF -D BUILD_opencv_gpucodec=OFF -D BUILD_opencv_gpufeatures2d=OFF -D BUILD_opencv_gpufilters=OFF -D BUILD_opencv_gpuimgproc=OFF -D BUILD_opencv_gpulegacy=OFF -D BUILD_opencv_gpuoptflow=OFF -D BUILD_opencv_gpustereo=OFF -D BUILD_opencv_gpuwarping=OFF .. @endcode - Set installation path and build type @code{.sh} diff --git a/doc/tutorials/introduction/windows_install/windows_install.markdown b/doc/tutorials/introduction/windows_install/windows_install.markdown index d12c4ee12a..e60c846b12 100644 --- a/doc/tutorials/introduction/windows_install/windows_install.markdown +++ b/doc/tutorials/introduction/windows_install/windows_install.markdown @@ -89,7 +89,7 @@ CMAKE_CONFIG_GENERATOR="Visual Studio 14 2015 Win64" @endcode with no Perf tests, no tests, no doc, no CUDA and no example @code{.bash} -CMAKE_OPTIONS='-DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DWITH_CUDA:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF' +CMAKE_OPTIONS='-DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF' @endcode -# In git command line enter following command : @code{.bash} diff --git a/platforms/android/build_sdk.py b/platforms/android/build_sdk.py index b8ab45c5d4..b40c26069e 100755 --- a/platforms/android/build_sdk.py +++ b/platforms/android/build_sdk.py @@ -160,7 +160,6 @@ class Builder: cmake_vars = dict( CMAKE_TOOLCHAIN_FILE=self.get_toolchain_file(), WITH_OPENCL="OFF", - WITH_CUDA="OFF", WITH_IPP=("ON" if abi.haveIPP() else "OFF"), WITH_TBB="ON", BUILD_EXAMPLES="OFF", @@ -195,7 +194,6 @@ class Builder: cmake_vars = dict( CMAKE_TOOLCHAIN_FILE=self.get_toolchain_file(), WITH_OPENCL="OFF", - WITH_CUDA="OFF", WITH_IPP="OFF", BUILD_ANDROID_SERVICE = 'ON' ) diff --git a/platforms/js/build_js.py b/platforms/js/build_js.py index 34b579a7a9..1f68dec14a 100644 --- a/platforms/js/build_js.py +++ b/platforms/js/build_js.py @@ -100,10 +100,6 @@ class Builder: "-DBUILD_SHARED_LIBS=OFF", "-DWITH_1394=OFF", "-DWITH_VTK=OFF", - "-DWITH_CUDA=OFF", - "-DWITH_CUFFT=OFF", - "-DWITH_CUBLAS=OFF", - "-DWITH_NVCUVID=OFF", "-DWITH_EIGEN=OFF", "-DWITH_FFMPEG=OFF", "-DWITH_GSTREAMER=OFF", diff --git a/platforms/maven/opencv/pom.xml b/platforms/maven/opencv/pom.xml index c221f233bb..46c28034c9 100644 --- a/platforms/maven/opencv/pom.xml +++ b/platforms/maven/opencv/pom.xml @@ -246,7 +246,6 @@ To correct this please execute the following Maven command from the Maven root d Unix Makefiles - -- GitLab