CMake 中找不到 CUDA_CUDA_LIBRARY (ADVANCED)

在编译 C++ / Cuda 的混合程序时,出现下面的 CMake 出错信息:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_CUDA_LIBRARY (ADVANCED)
    linked by target "***" in directory /home/wf/work/md/md/neuro/csrc

-- Configuring incomplete, errors occurred!

在简中网上,基本找不到解决方法,最后在 github 中看到 OpenCV 编译时,也会出现这种情况,
解决办法:
CMake 时, 添加这个变量:
-DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs,

这个问题,就解决了。

你可能感兴趣的:(编译链接调试技术,python,人工智能,开发语言)