CMake Error at /usr/share/cmake-3.5/Modules/FindCUDA.cmake:617 (message)

在编译cuda相关代码的时候,出现了编译错误,查了很多资料终于找到了解决的办法……………………………… 
– Boost version: 1.58.0 
– Found the following Boost libraries: 
– program_options 
CMake Error at /usr/share/cmake-3.5/Modules/FindCUDA.cmake:617 (message): 
Specify CUDA_TOOLKIT_ROOT_DIR 
Call Stack (most recent call first): 
CMakeLists.txt:11 (find_package)

– Configuring incomplete, errors occurred! 
See also “/usr/local/dibr-player-master/build/CMakeFiles/CMakeOutput.log”. 
解决办法:在编译cuda的时候,编译器会默认寻找/usr/local/cuda路径,而不是自己这里cuda的安装路径/usr/local/cuda-8.0,所以应该使用 
$ sudo ln -s /usr/local/cuda-8.0 /usr/local/cuda

制作一个软连接到/usr/local/cuda-8.0问题解决
 

你可能感兴趣的:(Linux)