mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
Provide a better Cuda example #2212
This commit is contained in:
parent
bd15a9dce7
commit
753b153631
5
playground/cuda/test.cpp
Normal file
5
playground/cuda/test.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -16,14 +16,23 @@ def configure(conf):
|
||||
# conf.env.LIBPATH_CUDA = ['c:\\foo\\bar\\lib']
|
||||
# conf.env.INCLUDES_CUDA = ['c:\\foo\\bar\\includes']
|
||||
|
||||
conf.env = conf.all_envs['cuda'] = conf.env.derive()
|
||||
conf.load('cuda', tooldir='.')
|
||||
|
||||
def build(bld):
|
||||
|
||||
# native application
|
||||
bld.program(
|
||||
source = 'test.cpp',
|
||||
target = 'testapp',
|
||||
)
|
||||
|
||||
# cuda application
|
||||
t = bld.program(
|
||||
source = 'test.cu main.cpp',
|
||||
target = 'app',
|
||||
use = 'CUDA CUDART')
|
||||
use = 'CUDA CUDART',
|
||||
env = bld.all_envs['cuda'])
|
||||
|
||||
#t.env.CUDAFLAGS = ['-deviceemu']
|
||||
# --ptxas-options="-v"
|
||||
|
Loading…
Reference in New Issue
Block a user