CUDA - yuki-kimoto/SPVM GitHub Wiki
A native config file for CUDA/nvcc:
my $config = SPVM::Builder::Config->new(file => __FILE__);
# Compiler and Linker common
my @ccldflags = qw(--compiler-options '-fPIC');
# Compiler
$config->cc('nvcc');
$config->add_ccflag(@ccldflags);
$config->ext('cu');
# Linker
$config->ld('nvcc');
$config->add_ldflag('-shared', @ccldflags);
$config;