You need the -ccbin
option for nvcc
, for example. to use icpc
(Intel C ++ compiler) use nvcc -ccbin=icpc
(assuming icpc
is available in your $PATH
).
Please note that you should always pass the C ++ compiler ( g++
, icpc
, etc.), since nvcc
treats the code as C ++, even if it is C code.
source share