这个错误通常是由于没有正确配置CMake来支持CUDA编译器导致的。下面我们将详细介绍如何解决这个问题。 解决方法 要解决此错误,我们需要确保在CMake中正确配置了CUDA编译器,具体方法如下: 确认您的系统已安装CUDA Toolkit。可以访问NVIDIA官方网站下载CUDA Toolkit。 在CMakeLists.txt文件中添加以下内容: enable_language(...
environment: CUDA 10.1 Ubuntu 16.04 TensorRT 5.1.5 I pulled the code today and try build, this error got again: -- The CUDA compiler identification is unknown CMake Error at CMakeLists.txt:582 (enable_language): No CMAKE_CUDA_COMPILER could be found. Tell CMake where to find the compil...
Without this change even if we have added "-allow-unsupported-compiler" to CMAKE_CUDA_FLAGS_INIT, the check will still fail. Sorry I don't know why.
Hello everybody, I am trying to include some CUDA-Code in an existing project. It seems that the CMAKE option enable_language(CUDA) leads to some troubles in setting NVCC compiler flags. With this CMAKE script everythi…
Why the defaults were wrong before this PR is best explained in my own words from a month ago: enable_language(CUDA) sets CMAKE_CUDA_ARCHITECTURES (assuming CMP0104 is enabled), so any defaults of our own must be set before this. This unfortunately means this code must be moved into the...
OCV_OPTION(ENABLE_CUDA_FIRST_CLASS_LANGUAGE "Enable CUDA as a first class language, if enabled dependant projects will need to use CMake >= 3.18" (WITH_CUDA ANDNOT CMAKE_VERSION VERSION_LESS 3.18)OCV_OPTION(ENABLE_CUDA_FIRST_CLASS_LANGUAGE ...