警告打印:
- nvcc warning : The 'compute_11', 'compute_12', 'compute_13', 'sm_11', 'sm_12', and 'sm_13' architectures are deprecated, and may be removed in a future release.
找到cmake后产生的OpencvConfig.cmake文件,找到如下代码:
- # Version Compute Capability from which OpenCV has been compiled is remembered
- set(OpenCV_COMPUTE_CAPABILITIES -gencode;arch=compute_11,code=sm_11;-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13;-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_30,code=compute_30)
将"-gencode ;arch=compute_11,code=sm_11";-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13; 等删除。
主要因为此架构在CUDA过时~~将来也将不支持
以上若无果:
在cmakelist中关闭cuda~~
或者在cmake时加上参数-D BUILD_opencv_gpu=OFF