[cmake-developers] [CMake 0016027]: nvcc encloses -ccbin argument with gratuitous quotation marks during intermediate-link phase
Mantis Bug Tracker
mantis at public.kitware.com
Mon Mar 21 17:06:39 EDT 2016
The following issue has been SUBMITTED.
======================================================================
https://public.kitware.com/Bug/view.php?id=16027
======================================================================
Reported By: Eyal Rozenberg
Assigned To:
======================================================================
Project: CMake
Issue ID: 16027
Category: Modules
Reproducibility: sometimes
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-03-21 17:06 EDT
Last Modified: 2016-03-21 17:06 EDT
======================================================================
Summary: nvcc encloses -ccbin argument with gratuitous
quotation marks during intermediate-link phase
Description:
I've been using CMake on Debian Stretch with CUDA. I'm not sure what the version
was until recently, but everything worked fine for me. Then I started getting
errors such as:
"/usr/local/cuda/bin/gcc": No such file or directory
CMakeFiles/tester.dir/build.make:2335: recipe for target
'CMakeFiles/wherever/foo.o' failed
The culprit seems to be /usr/share/cmake/Modules/FindCUDA.cmake, line 1554.
Pseudo-patch:
- list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
+ list(APPEND nvcc_flags -ccbin "${CUDA_HOST_COMPILER}")
that resolves the issue.
Steps to Reproduce:
1. export CC=/link/to/your/appropriate/gcc
2. cmake a project with CMakeList.txt which finds CUDA and with
set(CUDA_SEPARABLE_COMPILATION ON)
3. Build the project
The .cu files will compile, the intermediate-link phase won't pass
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-03-21 17:06 Eyal Rozenberg New Issue
======================================================================
More information about the cmake-developers
mailing list