Jetson Orin AGX上的CUDA开发报错:CMake Error at CMakeLists.txt:3 (project):No CMAKE_CUDA_COMPILER could be found.
环境
- 设备:Jetson Orin AGX
- Model:Jetson AGX Orin - Jetpack 5.1.1 [L4T 35.3.1]
- Distribution: Ubuntu 20.04 focal
- Release: 5.10.104-tegra
- CUDA: 11.4.315
- cuDNN: 8.6.0.166
- TensorRT: 8.5.2
- VPI: 2.2.7
- Vulkan: 1.3.204
- OpenCV: 4.5.4 - with CUDA: NO
报错代码
project(TensorRT_YoloV5 LANGUAGES CXX CUDA)
报错内容
Tell CMake where to find the compiler by setting either the environment
variable “CUDACXX” or the CMake cache entry CMAKE_CUDA_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.
解决办法
使用set函数为其指定CUAD的编译器的位置
set(CMAKE_CUDA_COMPILER /usr/local/cuda/bin/nvcc)
注意:你的编译器路径可能和我的不一样!
原因分析
就是没有找到相应的编译器