CMake Error: CUDA_nppi_LIBRARY (ADVANCED)


                                <div class="article-copyright">
                    版权声明:本文为博主原创文章,未经博主允许不得转载。                    https://blog.csdn.net/u014613745/article/details/78310916                </div>
                                            <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-2c6a5211c9.css">
                        <div class="htmledit_views" id="content_views">
                
<p>使用Cmake编译opencv源码遇到如下错误</p>
<p><span style="color:#ff0000;">CMake Error: The following variables are used in this project, but they are set to NOTFOUND.<br>
Please set them or make sure they are set and tested correctly in the CMake files:<br>
CUDA_nppi_LIBRARY (ADVANCED)<br>
linked by target "opencv_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev<br>
linked by target "opencv_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev<br>
linked by target "opencv_test_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev/test<br>
linked by target "opencv_core" in directory D:/Cproject/opencv/opencv/sources/modules/core<br>
linked by target "opencv_core" in directory D:/Cproject/opencv/opencv/sources/modules/core<br>
linked by target "opencv_test_core" in directory D:/Cproject/opencv/opencv/sources/modules/core<br>
linked by target "opencv_perf_core" in directory D:/Cproject/opencv/opencv/sources/modules/core<br>
linked by target "opencv_test_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm<br>
linked by target "opencv_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm<br>
linked by target "opencv_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm<br>
linked by target "opencv_perf_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm<br>
linked by target "opencv_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann<br>
linked by target "opencv_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann<br>
linked by target "opencv_test_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann<br>
linked by target "opencv_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc<br>
linked by target "opencv_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc<br>
linked by target "opencv_test_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc<br>
linked by target "opencv_perf_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc<br>
linked by target "opencv_test_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml<br>
linked by target "opencv_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml<br>
linked by target "opencv_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml<br>
linked by target "opencv_test_video" in directory D:/Cproject/opencv/opencv/sources/modules/video<br>
linked by target "opencv_video" in directory D:/Cproject/opencv/opencv/sources/modules/video<br>
linked by target "opencv_video" in directory D:/Cproject/opencv/opencv/sources/modules/video<br>
linked by target "opencv_perf_video" in directory D:/Cproject/opencv/opencv/sources/modules/video<br>
linked by target "opencv_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm<br>
linked by target "opencv_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm<br>
linked by target "opencv_test_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm<br>
linked by target "opencv_perf_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm<br>
linked by target "opencv_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters<br>
linked by target "opencv_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters<br>
linked by target "opencv_test_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters<br>
linked by target "opencv_perf_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters<br>
linked by target "opencv_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc<br>
linked by target "opencv_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc<br>
linked by target "opencv_test_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc<br>
linked by target "opencv_perf_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc<br>
linked by target "opencv_perf_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping<br>
linked by target "opencv_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping<br>
linked by target "opencv_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping<br>
linked by target "opencv_test_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping<br>
linked by target "opencv_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs<br>
linked by target "opencv_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs<br>
linked by target "opencv_test_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs<br>
linked by target "opencv_perf_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs<br>
linked by target "opencv_perf_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo<br>
linked by target "opencv_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo<br>
linked by target "opencv_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo<br>
linked by target "opencv_test_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo<br>
linked by target "opencv_test_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape<br>
linked by target "opencv_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape<br>
linked by target "opencv_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape<br>
linked by target "opencv_test_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio<br>
linked by target "opencv_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio<br>
linked by target "opencv_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio<br>
linked by target "opencv_perf_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio<br>
linked by target "opencv_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec<br>
linked by target "opencv_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec<br>
linked by target "opencv_perf_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec<br>
linked by target "opencv_test_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec<br>
linked by target "opencv_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui<br>
linked by target "opencv_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui<br>
linked by target "opencv_test_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui<br>
linked by target "opencv_perf_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect<br>
linked by target "opencv_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect<br>
linked by target "opencv_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect<br>
linked by target "opencv_test_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect<br>
linked by target "opencv_ts" in directory D:/Cproject/opencv/opencv/sources/modules/ts<br>
linked by target "opencv_ts" in directory D:/Cproject/opencv/opencv/sources/modules/ts<br>
linked by target "opencv_test_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d<br>
linked by target "opencv_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d<br>
linked by target "opencv_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d<br>
linked by target "opencv_perf_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d<br>
linked by target "opencv_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d<br>
linked by target "opencv_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d<br>
linked by target "opencv_test_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d<br>
linked by target "opencv_perf_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d<br>
linked by target "opencv_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d<br>
linked by target "opencv_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d<br>
linked by target "opencv_test_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d<br>
linked by target "opencv_perf_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d<br>
linked by target "opencv_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy<br>
linked by target "opencv_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy<br>
linked by target "opencv_test_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy<br>
linked by target "opencv_perf_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy<br>
linked by target "opencv_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect<br>
linked by target "opencv_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect<br>
linked by target "opencv_perf_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect<br>
linked by target "opencv_test_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect<br>
linked by target "opencv_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow<br>
linked by target "opencv_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow<br>
linked by target "opencv_test_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow<br>
linked by target "opencv_perf_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow<br>
linked by target "opencv_perf_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo<br>
linked by target "opencv_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo<br>
linked by target "opencv_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo<br>
linked by target "opencv_test_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo<br>
linked by target "opencv_test_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching<br>
linked by target "opencv_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching<br>
linked by target "opencv_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching<br>
linked by target "opencv_perf_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching<br>
linked by target "opencv_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres<br>
linked by target "opencv_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres<br>
linked by target "opencv_test_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres<br>
linked by target "opencv_perf_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres<br>
linked by target "opencv_videostab" in directory D:/Cproject/opencv/opencv/sources/modules/videostab<br>
linked by target "opencv_videostab" in directory D:/Cproject/opencv/opencv/sources/modules/videostab<br>
linked by target "opencv_traincascade" in directory D:/Cproject/opencv/opencv/sources/apps/traincascade<br>
linked by target "opencv_createsamples" in directory D:/Cproject/opencv/opencv/sources/apps/createsamples<br>
linked by target "opencv_annotation" in directory D:/Cproject/opencv/opencv/sources/apps/annotation<br>
linked by target "opencv_visualisation" in directory D:/Cproject/opencv/opencv/sources/apps/visualisation<br>
linked by target "opencv_version" in directory D:/Cproject/opencv/opencv/sources/apps/version<br></span></p>
<span style="color:#ff0000;">Please set them or make sure they are set and tested correctly in the CMake files:<br>
CUDA_nppi_LIBRARY (ADVANCED)<br>
linked by target "opencv_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev<br>
linked by target "opencv_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev<br>
linked by target "opencv_test_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev/test<br>
linked by target "opencv_core" in directory D:/Cproject/opencv/opencv/sources/modules/core<br>
linked by target "opencv_core" in directory D:/Cproject/opencv/opencv/sources/modules/core<br>
linked by target "opencv_test_core" in directory D:/Cproject/opencv/opencv/sources/modules/core<br>
linked by target "opencv_perf_core" in directory D:/Cproject/opencv/opencv/sources/modules/core<br>
linked by target "opencv_test_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm<br>
linked by target "opencv_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm<br>
linked by target "opencv_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm<br>
linked by target "opencv_perf_cudaarithm" in directory D:/Cproject/opencv/opencv/sources/modules/cudaarithm<br>
linked by target "opencv_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann<br>
linked by target "opencv_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann<br>
linked by target "opencv_test_flann" in directory D:/Cproject/opencv/opencv/sources/modules/flann<br>
linked by target "opencv_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc<br>
linked by target "opencv_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc<br>
linked by target "opencv_test_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc<br>
linked by target "opencv_perf_imgproc" in directory D:/Cproject/opencv/opencv/sources/modules/imgproc<br>
linked by target "opencv_test_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml<br>
linked by target "opencv_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml<br>
linked by target "opencv_ml" in directory D:/Cproject/opencv/opencv/sources/modules/ml<br>
linked by target "opencv_test_video" in directory D:/Cproject/opencv/opencv/sources/modules/video<br>
linked by target "opencv_video" in directory D:/Cproject/opencv/opencv/sources/modules/video<br>
linked by target "opencv_video" in directory D:/Cproject/opencv/opencv/sources/modules/video<br>
linked by target "opencv_perf_video" in directory D:/Cproject/opencv/opencv/sources/modules/video<br>
linked by target "opencv_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm<br>
linked by target "opencv_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm<br>
linked by target "opencv_test_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm<br>
linked by target "opencv_perf_cudabgsegm" in directory D:/Cproject/opencv/opencv/sources/modules/cudabgsegm<br>
linked by target "opencv_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters<br>
linked by target "opencv_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters<br>
linked by target "opencv_test_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters<br>
linked by target "opencv_perf_cudafilters" in directory D:/Cproject/opencv/opencv/sources/modules/cudafilters<br>
linked by target "opencv_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc<br>
linked by target "opencv_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc<br>
linked by target "opencv_test_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc<br>
linked by target "opencv_perf_cudaimgproc" in directory D:/Cproject/opencv/opencv/sources/modules/cudaimgproc<br>
linked by target "opencv_perf_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping<br>
linked by target "opencv_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping<br>
linked by target "opencv_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping<br>
linked by target "opencv_test_cudawarping" in directory D:/Cproject/opencv/opencv/sources/modules/cudawarping<br>
linked by target "opencv_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs<br>
linked by target "opencv_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs<br>
linked by target "opencv_test_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs<br>
linked by target "opencv_perf_imgcodecs" in directory D:/Cproject/opencv/opencv/sources/modules/imgcodecs<br>
linked by target "opencv_perf_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo<br>
linked by target "opencv_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo<br>
linked by target "opencv_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo<br>
linked by target "opencv_test_photo" in directory D:/Cproject/opencv/opencv/sources/modules/photo<br>
linked by target "opencv_test_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape<br>
linked by target "opencv_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape<br>
linked by target "opencv_shape" in directory D:/Cproject/opencv/opencv/sources/modules/shape<br>
linked by target "opencv_test_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio<br>
linked by target "opencv_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio<br>
linked by target "opencv_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio<br>
linked by target "opencv_perf_videoio" in directory D:/Cproject/opencv/opencv/sources/modules/videoio<br>
linked by target "opencv_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec<br>
linked by target "opencv_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec<br>
linked by target "opencv_perf_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec<br>
linked by target "opencv_test_cudacodec" in directory D:/Cproject/opencv/opencv/sources/modules/cudacodec<br>
linked by target "opencv_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui<br>
linked by target "opencv_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui<br>
linked by target "opencv_test_highgui" in directory D:/Cproject/opencv/opencv/sources/modules/highgui<br>
linked by target "opencv_perf_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect<br>
linked by target "opencv_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect<br>
linked by target "opencv_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect<br>
linked by target "opencv_test_objdetect" in directory D:/Cproject/opencv/opencv/sources/modules/objdetect<br>
linked by target "opencv_ts" in directory D:/Cproject/opencv/opencv/sources/modules/ts<br>
linked by target "opencv_ts" in directory D:/Cproject/opencv/opencv/sources/modules/ts<br>
linked by target "opencv_test_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d<br>
linked by target "opencv_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d<br>
linked by target "opencv_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d<br>
linked by target "opencv_perf_features2d" in directory D:/Cproject/opencv/opencv/sources/modules/features2d<br>
linked by target "opencv_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d<br>
linked by target "opencv_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d<br>
linked by target "opencv_test_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d<br>
linked by target "opencv_perf_calib3d" in directory D:/Cproject/opencv/opencv/sources/modules/calib3d<br>
linked by target "opencv_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d<br>
linked by target "opencv_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d<br>
linked by target "opencv_test_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d<br>
linked by target "opencv_perf_cudafeatures2d" in directory D:/Cproject/opencv/opencv/sources/modules/cudafeatures2d<br>
linked by target "opencv_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy<br>
linked by target "opencv_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy<br>
linked by target "opencv_test_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy<br>
linked by target "opencv_perf_cudalegacy" in directory D:/Cproject/opencv/opencv/sources/modules/cudalegacy<br>
linked by target "opencv_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect<br>
linked by target "opencv_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect<br>
linked by target "opencv_perf_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect<br>
linked by target "opencv_test_cudaobjdetect" in directory D:/Cproject/opencv/opencv/sources/modules/cudaobjdetect<br>
linked by target "opencv_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow<br>
linked by target "opencv_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow<br>
linked by target "opencv_test_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow<br>
linked by target "opencv_perf_cudaoptflow" in directory D:/Cproject/opencv/opencv/sources/modules/cudaoptflow<br>
linked by target "opencv_perf_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo<br>
linked by target "opencv_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo<br>
linked by target "opencv_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo<br>
linked by target "opencv_test_cudastereo" in directory D:/Cproject/opencv/opencv/sources/modules/cudastereo<br>
linked by target "opencv_test_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching<br>
linked by target "opencv_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching<br>
linked by target "opencv_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching<br>
linked by target "opencv_perf_stitching" in directory D:/Cproject/opencv/opencv/sources/modules/stitching<br>
linked by target "opencv_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres<br>
linked by target "opencv_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres<br>
linked by target "opencv_test_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres<br>
linked by target "opencv_perf_superres" in directory D:/Cproject/opencv/opencv/sources/modules/superres<br>
linked by target "opencv_videostab" in directory D:/Cproject/opencv/opencv/sources/modules/videostab<br>
linked by target "opencv_videostab" in directory D:/Cproject/opencv/opencv/sources/modules/videostab<br>
linked by target "opencv_traincascade" in directory D:/Cproject/opencv/opencv/sources/apps/traincascade<br>
linked by target "opencv_createsamples" in directory D:/Cproject/opencv/opencv/sources/apps/createsamples<br>
linked by target "opencv_annotation" in directory D:/Cproject/opencv/opencv/sources/apps/annotation<br>
linked by target "opencv_visualisation" in directory D:/Cproject/opencv/opencv/sources/apps/visualisation<br></span>
<p><span style="color:#ff0000;">linked by target "opencv_version" in directory D:/Cproject/opencv/opencv/sources/apps/version</span></p>
<p>原因解析:</p>
<p>cuda9不再支持2.0架构</p>
<p><br></p>
<p>解决方案如下:</p>
<p>1).找到FindCUDA.cmake文件</p>
<p>找到行</p>
<pre οnclick="hljs.copyCode(event)"><code class="language-cpp hljs">find_cuda_helper_libs(nppi)</code><div class="hljs-button" data-title="复制"></div></pre>改为<pre οnclick="hljs.copyCode(event)"><code class="language-cpp hljs"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppial)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppicc)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppicom)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppidei)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppif)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppig)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppim)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppist)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppisu)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  find_cuda_helper_libs(nppitc)</div></div></li></ol></code><div class="hljs-button" data-title="复制"></div></pre>2).找到行
<p></p>
<p></p>
<pre οnclick="hljs.copyCode(event)"><code class="language-cpp hljs"><span class="hljs-built_in">set</span>(CUDA_npp_LIBRARY <span class="hljs-string">"${CUDA_nppc_LIBRARY};${CUDA_nppi_LIBRARY};${CUDA_npps_LIBRARY}"</span>)</code><div class="hljs-button" data-title="复制"></div></pre>改为
<p></p>
<p></p>
<pre οnclick="hljs.copyCode(event)"><code class="language-cpp hljs"><span class="hljs-built_in">set</span>(CUDA_npp_LIBRARY <span class="hljs-string">"${CUDA_nppc_LIBRARY};${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBRARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY};${CUDA_npps_LIBRARY}"</span>)
</code><div class="hljs-button" data-title="复制"></div></pre>3).找到行
<p></p>
<p></p>
<pre οnclick="hljs.copyCode(event)"><code class="language-cpp hljs">unset(CUDA_nppi_LIBRARY CACHE)</code><div class="hljs-button" data-title="复制"></div></pre>改为
<p></p>
<p></p>
<pre οnclick="hljs.copyCode(event)"><code class="language-cpp hljs"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppial_LIBRARY CACHE)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppicc_LIBRARY CACHE)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppicom_LIBRARY CACHE)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppidei_LIBRARY CACHE)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppif_LIBRARY CACHE)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppig_LIBRARY CACHE)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppim_LIBRARY CACHE)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppist_LIBRARY CACHE)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppisu_LIBRARY CACHE)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">unset(CUDA_nppitc_LIBRARY CACHE)</div></div></li></ol></code><div class="hljs-button" data-title="复制"></div></pre><br>
4).找到文件<span style="color:rgb(36,39,41);font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;background-color:rgb(239,240,241);">OpenCVDetectCUDA.cmake</span>
<p></p>
<p>修改以下几行</p>
<p></p>
<pre οnclick="hljs.copyCode(event)"><code class="language-cpp hljs"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> ...</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  <span class="hljs-built_in">set</span>(__cuda_arch_ptx <span class="hljs-string">""</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  <span class="hljs-keyword">if</span>(CUDA_GENERATION STREQUAL <span class="hljs-string">"Fermi"</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">    <span class="hljs-built_in">set</span>(__cuda_arch_bin <span class="hljs-string">"2.0"</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  elseif(CUDA_GENERATION STREQUAL <span class="hljs-string">"Kepler"</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">    <span class="hljs-built_in">set</span>(__cuda_arch_bin <span class="hljs-string">"3.0 3.5 3.7"</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  ...</div></div></li></ol></code><div class="hljs-button" data-title="复制"></div></pre>改为
<p></p>
<p></p>
<pre οnclick="hljs.copyCode(event)"><code class="language-cpp hljs"><ol class="hljs-ln"><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  ...</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  <span class="hljs-built_in">set</span>(__cuda_arch_ptx <span class="hljs-string">""</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  <span class="hljs-keyword">if</span>(CUDA_GENERATION STREQUAL <span class="hljs-string">"Kepler"</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">    <span class="hljs-built_in">set</span>(__cuda_arch_bin <span class="hljs-string">"3.0 3.5 3.7"</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  elseif(CUDA_GENERATION STREQUAL <span class="hljs-string">"Maxwell"</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">    <span class="hljs-built_in">set</span>(__cuda_arch_bin <span class="hljs-string">"5.0 5.2"</span>)</div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line">  ...</div></div></li></ol></code><div class="hljs-button" data-title="复制"></div></pre><br><p>5).cuda9中有一个单独的<span style="color:rgb(36,39,41);font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;">halffloat(<span style="color:rgb(36,39,41);font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;background-color:rgb(239,240,241);">cuda_fp16.h)</span></span>头文件,也应该被包括在opencv的目录里</p>
<p>将头文件<span style="background-color:rgb(239,240,241);color:rgb(36,39,41);font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;font-size:13px;">cuda_fp16.h</span>添加至&nbsp;<span class="pln" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;background-color:rgb(239,240,241);border:0px;line-height:inherit;vertical-align:baseline;color:rgb(48,51,54);">opencv</span><span class="pln" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;background-color:rgb(239,240,241);border:0px;line-height:inherit;vertical-align:baseline;color:rgb(48,51,54);">\modules\cudev\include\opencv2\cudev\common</span><span class="pun" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;background-color:rgb(239,240,241);border:0px;line-height:inherit;vertical-align:baseline;color:rgb(48,51,54);">.</span><span class="pln" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;background-color:rgb(239,240,241);border:0px;line-height:inherit;vertical-align:baseline;color:rgb(48,51,54);">hpp</span></p>
<p></p>
<p>即在common.hpp中添加</p>
<p></p>
<pre class="default prettyprint prettyprinted" style="border:0px;font-size:13px;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;overflow:auto;background-color:rgb(239,240,241);color:rgb(57,51,24);" name="code" οnclick="hljs.copyCode(event)"><code style="border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;vertical-align:baseline;" class="hljs cpp"><span class="com" style="border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(133,140,147);"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span></span></span><span class="pln" style="border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(48,51,54);"><span class="hljs-meta"> </span></span><span class="str" style="border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(125,39,39);"><span class="hljs-meta"><span class="hljs-meta-string">&lt;cuda_fp16.h&gt;</span></span></span></code><div class="hljs-button" data-title="复制"></div></pre>
重新生成即可
<p></p>
            </div>
               

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值