@conf
def find_cuda_libs(self):
    "\n\tfind the cuda include and library folders\n\n\tuse ctx.program(source='main.c', target='app', use='CUDA CUDART')\n\t"
    if (not self.env.NVCC):
        self.fatal('check for nvcc first')
    d = self.root.find_node(self.env.NVCC[0]).parent.parent
    node = d.find_node('include')
    _includes = ((node and node.abspath()) or '')
    _libpath = []
    for x in ('lib64', 'lib'):
        try:
            _libpath.append(d.find_node(x).abspath())
        except:
            pass
    self.check_cxx(header='cuda.h', lib='cuda', libpath=_libpath, includes=_includes)
    self.check_cxx(header='cuda.h', lib='cudart', libpath=_libpath, includes=_includes)
find the cuda include and library folders

use ctx.program(source='main.c', target='app', use='CUDA CUDART')
@conf
def find_cuda_libs(self):
    "\n\tfind the cuda include and library folders\n\n\tuse ctx.program(source='main.c', target='app', use='CUDA CUDART')\n\t"
    if (not self.env.NVCC):
        self.fatal('check for nvcc first')
    d = self.root.find_node(self.env.NVCC[0]).parent.parent
    node = d.find_node('include')
    _includes = ((node and node.abspath()) or )
    _libpath = []
    for x in ('lib64', 'lib'):
        try:
            _libpath.append(d.find_node(x).abspath())
        except:
            pass
    self.check_cxx(header='cuda.h', lib='cuda', libpath=_libpath, includes=_includes)
    self.check_cxx(header='cuda.h', lib='cudart', libpath=_libpath, includes=_includes)