FindCUDA does not respect -ccbin or --compiler-bindir arguments
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
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.