forked from kashif/node-cuda
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwscript
More file actions
24 lines (19 loc) · 708 Bytes
/
wscript
File metadata and controls
24 lines (19 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import Options
srcdir = "."
blddir = "build"
VERSION = "0.1.0"
def set_options(opt):
opt.tool_options("compiler_cxx")
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
if not conf.check(lib="cuda",
libpath=['/usr/local/cuda/lib', '/usr/lib64/nvidia-graphics-current'],
includes=['/usr/local/cuda/include'],
uselib_store="CUDA"):
conf.fatal('Cannot find CUDA library.');
def build(bld):
obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
obj.target = "cuda"
obj.source = "src/bindings.cpp src/ctx.cpp src/device.cpp src/function.cpp src/mem.cpp src/module.cpp"
obj.uselib = "CUDA"