waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

wscript (1021B)


      1 #!/usr/bin/env python
      2 # encoding: utf-8
      3 # Thomas Nagy, 2010
      4 
      5 top = '.'
      6 out = 'build'
      7 
      8 def options(opt):
      9 	opt.load('compiler_cxx')
     10 
     11 def configure(conf):
     12 	conf.load('compiler_cxx') # cuda does not compile in c mode
     13 
     14 	# the tests will fail if the libraries cannot be found
     15 	# try pre_setting some variables, like this
     16 	# conf.env.LIBPATH_CUDA = ['c:\\foo\\bar\\lib']
     17 	# conf.env.INCLUDES_CUDA = ['c:\\foo\\bar\\includes']
     18 
     19 	conf.load('cuda', tooldir='.')
     20 
     21 	# Add a few flags to test proper passing to nvcc
     22 	conf.env.CXXFLAGS=['-fPIC', '--std=c++11']
     23 
     24 def build(bld):
     25 
     26 	# cuda application
     27 	t = bld.program(
     28 		source = 'test.cu main.cpp',
     29 		target = 'app',
     30 		use    = 'CUDA CUDART')
     31 
     32 	#t.env.CUDAFLAGS = ['-deviceemu']
     33 	# --ptxas-options="-v"
     34 	# --ptxas-options="-v -maxrregcount=10"
     35 
     36 	# -----------------------
     37 
     38 	# native application
     39 	bld.program(
     40 		source = 'test.cpp',
     41 		target = 'testapp-native')
     42 
     43 	# cuda application
     44 	bld.program(
     45 		source = 'test.cpp',
     46 		target = 'testapp',
     47 		cuda   = True,
     48 		use    = 'CUDA CUDART')
     49 
     50