wscript 1.1 KB

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