akmhoque | fa8ee9b | 2014-03-14 09:06:24 -0500 | [diff] [blame^] | 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 import Utils,Configure,Options,Logs |
| 7 | def configure(conf): |
| 8 | for compiler in conf.options.dcheck.split(','): |
| 9 | conf.env.stash() |
| 10 | conf.start_msg('Checking for %r (d compiler)'%compiler) |
| 11 | try: |
| 12 | conf.load(compiler) |
| 13 | except conf.errors.ConfigurationError ,e: |
| 14 | conf.env.revert() |
| 15 | conf.end_msg(False) |
| 16 | Logs.debug('compiler_d: %r'%e) |
| 17 | else: |
| 18 | if conf.env.D: |
| 19 | conf.end_msg(conf.env.get_flat('D')) |
| 20 | conf.env['COMPILER_D']=compiler |
| 21 | break |
| 22 | conf.end_msg(False) |
| 23 | else: |
| 24 | conf.fatal('no suitable d compiler was found') |
| 25 | def options(opt): |
| 26 | d_compiler_opts=opt.add_option_group('D Compiler Options') |
| 27 | d_compiler_opts.add_option('--check-d-compiler',default='gdc,dmd,ldc2',action='store',help='check for the compiler [Default:gdc,dmd,ldc2]',dest='dcheck') |
| 28 | for d_compiler in['gdc','dmd','ldc2']: |
| 29 | opt.load('%s'%d_compiler) |