[cmake-developers] [CMake 0013674]: FindCUDA does not respect -ccbin or --compiler-bindir arguments
Mantis Bug Tracker
mantis at public.kitware.com
Fri Nov 9 13:19:49 EST 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13674
======================================================================
Reported By: James Shackleford
Assigned To:
======================================================================
Project: CMake
Issue ID: 13674
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-11-09 13:19 EST
Last Modified: 2012-11-09 13:19 EST
======================================================================
Summary: FindCUDA does not respect -ccbin or
--compiler-bindir arguments
Description:
FindCUDA/run_nvcc.cmake (lines 106--115) prevent manual specification of the
compiler to be used by the Nvidia CUDA compiler nvcc via the -ccbin or
--compiler-bindir arguments. The issue is to due the incorrect usage of
LIST(FIND ...) to perform a substring search, resulting in a false negative.
As a result of the failed LIST(FIND ...), run_nvcc.cmake sets the preferred
compiler to the system default gcc *AND* also passes the undetected manually
specified gcc version. This results in nvcc failing due to a duplicate parameter
specification for the external compiler.
Because nvcc is only compatible with a select few versions of gcc on Linux, the
inability to set this parameter is an issue for users who do not use one of
these Nvidia approved versions of gcc as their default compiler.
Steps to Reproduce:
For example:
set (CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} --compiler-bindir=/usr/bin/gcc-4.4")
with result in
nvcc fatal : redefinition of argument 'compiler-bindir'
Additional Information:
I do not believe FindCUDA/run_nvcc.cmake (lines 106--115) are necessary.
Removal of these offending lines seems to restore correct behavior for the
cases:
[1] -ccbin parameter not specified
[2] -ccbin parameter specified
[3] --compiler-bindir parameter not specified
[4] --compiler-bindir parameter specified
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-11-09 13:19 James ShacklefordNew Issue
2012-11-09 13:19 James ShacklefordFile Added: FindCUDA.patch
======================================================================
More information about the cmake-developers
mailing list