在使用cmake编译VTK程序过程中,执行cmake命令时,出现如下错误:
-- The CUDA compiler identification is unknown
CMake Error at CMakeLists.txt:4 (enable_language):
No CMAKE_CUDA_COMPILER could be found.
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.
提示信息很明确,找不CUDA编译器,需要设置CUDACXX或CMAKE_CUDA_COMPILER变量,或者增加PATH。
使用设置path的方法解决:
export PATH=/usr/local/cuda-10.1/bin/:$PATH