[0fa325b] | 1 | #! /usr/bin/env python |
---|
| 2 | # encoding: utf-8 |
---|
| 3 | # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file |
---|
| 4 | |
---|
| 5 | import os,sys,imp,types |
---|
| 6 | from waflib.Tools import ccroot |
---|
| 7 | from waflib import Utils,Configure |
---|
| 8 | from waflib.Logs import debug |
---|
| 9 | cxx_compiler={'win32':['msvc','g++'],'cygwin':['g++'],'darwin':['g++'],'aix':['xlc++','g++'],'linux':['g++','icpc'],'sunos':['sunc++','g++'],'irix':['g++'],'hpux':['g++'],'gnu':['g++'],'java':['g++','msvc','icpc'],'default':['g++']} |
---|
| 10 | def configure(conf): |
---|
| 11 | try:test_for_compiler=conf.options.check_cxx_compiler |
---|
| 12 | except AttributeError:conf.fatal("Add options(opt): opt.load('compiler_cxx')") |
---|
| 13 | for compiler in test_for_compiler.split(): |
---|
| 14 | conf.env.stash() |
---|
| 15 | conf.start_msg('Checking for %r (c++ compiler)'%compiler) |
---|
| 16 | try: |
---|
| 17 | conf.load(compiler) |
---|
| 18 | except conf.errors.ConfigurationError ,e: |
---|
| 19 | conf.env.revert() |
---|
| 20 | conf.end_msg(False) |
---|
| 21 | debug('compiler_cxx: %r'%e) |
---|
| 22 | else: |
---|
| 23 | if conf.env['CXX']: |
---|
| 24 | conf.end_msg(conf.env.get_flat('CXX')) |
---|
| 25 | conf.env['COMPILER_CXX']=compiler |
---|
| 26 | break |
---|
| 27 | conf.end_msg(False) |
---|
| 28 | else: |
---|
| 29 | conf.fatal('could not configure a c++ compiler!') |
---|
| 30 | def options(opt): |
---|
| 31 | opt.load_special_tools('cxx_*.py') |
---|
| 32 | global cxx_compiler |
---|
| 33 | build_platform=Utils.unversioned_sys_platform() |
---|
| 34 | possible_compiler_list=cxx_compiler[build_platform in cxx_compiler and build_platform or'default'] |
---|
| 35 | test_for_compiler=' '.join(possible_compiler_list) |
---|
| 36 | cxx_compiler_opts=opt.add_option_group('C++ Compiler Options') |
---|
| 37 | cxx_compiler_opts.add_option('--check-cxx-compiler',default="%s"%test_for_compiler,help='On this platform (%s) the following C++ Compiler will be checked by default: "%s"'%(build_platform,test_for_compiler),dest="check_cxx_compiler") |
---|
| 38 | for x in test_for_compiler.split(): |
---|
| 39 | opt.load('%s'%x) |
---|