“编译CUDA编译器识别源文件...失败”时的错误日志在哪里?

问题描述 投票:0回答:1

(从这个问题衍生出来)

假设我尝试配置一个使用 CUDA 的项目,即调用

enable_language(CUDA)

在CMakeLists.txt中,配置时,我被告知:

... etc. etc. ...
CMake Error at C:/Program Files/CMake/share/cmake-3.30/Modules/CMakeDetermineCompilerId.cmake:838 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler:

  Build flags:

  Id flags: --keep;--keep-dir;tmp -v`

"CMakeCUDACompilerId.cu" failed.

Compiler: C:/Program Files/NVIDIA GPU Computing

Toolkit/CUDA/v11.6/bin/nvcc.exe

Build flags:

Id flags: --keep;--keep-dir;tmp -v


Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.30/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Program Files/CMake/share/cmake-3.30/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  C:/Program Files/CMake/share/cmake-3.30/Modules/CMakeDetermineCUDACompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:34 (enable_language)

好吧,公平地说,这是一个错误 - 但我需要知道错误是什么!在哪里可以找到该编译尝试的错误日志或标准错误流?假设我用 cmake -B C:\Path\To\BuildDir

 构建。

cmake cuda buildconfiguration
1个回答
0
投票
启动 CMake 3.26,并根据 CMake 文档的

本节,配置时错误应位于:

${CMAKE_BINARY_DIR}/CMakeFiles/CMakeConfigureLog.yaml

为了完整起见,在 CMake 3.25 之前,错误记录在名为

CMakeError.log

 的文件中。请参阅
此问题了解更多信息。

© www.soinside.com 2019 - 2024. All rights reserved.