waf

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

wscript (1112B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 # Thomas Nagy, 2006-2010 (ita)
      4 
      5 # the following two variables are used by the target "waf dist"
      6 VERSION='0.0.1'
      7 APPNAME='cxx_test'
      8 
      9 # these variables are mandatory ('/' are converted automatically)
     10 top = '.'
     11 out = 'build'
     12 
     13 def options(opt):
     14 	opt.load('compiler_cxx')
     15 
     16 def configure(conf):
     17 	conf.load('compiler_cxx')
     18 	conf.check(header_name='stdio.h', features='cxx cxxprogram', mandatory=False)
     19 
     20 def build(bld):
     21 	bld.shlib(source='a.cpp', target='mylib', vnum='9.8.7')
     22 	bld.shlib(source='a.cpp', target='mylib2', vnum='9.8.7', cnum='9.8')
     23 	bld.shlib(source='a.cpp', target='mylib3')
     24 	bld.program(source='main.cpp', target='app', use='mylib')
     25 	bld.stlib(target='foo', source='b.cpp')
     26 
     27 	# just a test to check if the .c is compiled as c++ when no c compiler is found
     28 	bld.program(features='cxx cxxprogram', source='main.c', target='app2')
     29 
     30 	if bld.cmd != 'clean':
     31 		from waflib import Logs
     32 		bld.logger = Logs.make_logger('test.log', 'build') # just to get a clean output
     33 		bld.check(header_name='sadlib.h', features='cxx cxxprogram', mandatory=False)
     34 		bld.logger = None
     35