I have a C project in Cmake
in which I have embedded cuda
kernel module.
I want to pass --ptxas-options=-v
only to nvcc
in-order to view
Number of registers usage per thread and
shared Memory usage per block.
By searching on howto pass flags to nvcc
in Cmake
, I came across a solution
add_compile_options(myprog
PRIVATE
$<$<COMPILE_LANGUAGE:C>:-Wall>
$<$<COMPILE_LANGUAGE:CUDA>:-arch=sm_20 -ptxas-options=-v>
)
but this didn't show me the above properties. I think these flags aren't passed to nvcc
properly.
How can I pass --ptxas-options=-v
to my nvcc
compiler ?