3 from waflib
import Task
4 from waflib.TaskGen
import extension
5 from waflib.Tools
import ccroot, c_preproc
6 from waflib.Configure
import conf
12 run_str =
'${NVCC} ${NVCCFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CXX_SRC_F}${SRC} ${CXX_TGT_F} ${TGT}' 19 @extension(
'.cu',
'.cuda')
21 return self.create_compiled_task(
'cuda', node)
26 if getattr(self,
'cuda',
False):
27 return self.create_compiled_task(
'cuda', node)
29 return self.create_compiled_task(
'cxx', node)
37 incs=[
"cuda.h"], libs=[
"cuda",
"cudart"], bins=[
"nvcc"])
39 if not 'HAVE_CUDA' in cfg.env:
41 nvccflags =
"-shared -Xcompiler -fPIC " 42 nvccflags += os.environ.get(
"NVCCFLAGS",
"")
43 cfg.env.NVCCFLAGS += nvccflags.strip().
split()
44 print (
"NVCCFLAGS = %s" % (
' '.
join(cfg.env.NVCCFLAGS)))
def _configure(ctx, name, incs=(), libs=(), bins=(), pcname=None, mandatory=True)
Proc * join(Pipeline &pipeline, Proc *src, Proc *dst)
void split(std::string const &s, char c, OutIter dest)