Changeset 904702d for waflib/Tools/compiler_d.py
- Timestamp:
- Mar 14, 2015, 6:06:10 PM (10 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 6d7acc8
- Parents:
- 5525507
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waflib/Tools/compiler_d.py
r5525507 r904702d 3 3 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file 4 4 5 import os,sys,imp,types 5 import os,sys,imp,types,re 6 6 from waflib import Utils,Configure,Options,Logs 7 d_compiler={'default':['gdc','dmd','ldc2']} 8 def default_compilers(): 9 build_platform=Utils.unversioned_sys_platform() 10 possible_compiler_list=d_compiler.get(build_platform,d_compiler['default']) 11 return' '.join(possible_compiler_list) 7 12 def configure(conf): 8 for compiler in conf.options.dcheck.split(','): 13 try:test_for_compiler=conf.options.check_d_compiler or default_compilers() 14 except AttributeError:conf.fatal("Add options(opt): opt.load('compiler_d')") 15 for compiler in re.split('[ ,]+',test_for_compiler): 9 16 conf.env.stash() 10 conf.start_msg('Checking for %r ( dcompiler)'%compiler)17 conf.start_msg('Checking for %r (D compiler)'%compiler) 11 18 try: 12 19 conf.load(compiler) … … 22 29 conf.end_msg(False) 23 30 else: 24 conf.fatal(' no suitable d compiler was found')31 conf.fatal('could not configure a D compiler!') 25 32 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) 33 test_for_compiler=default_compilers() 34 d_compiler_opts=opt.add_option_group('Configuration options') 35 d_compiler_opts.add_option('--check-d-compiler',default=None,help='list of D compilers to try [%s]'%test_for_compiler,dest='check_d_compiler') 36 for x in test_for_compiler.split(): 37 opt.load('%s'%x)
Note: See TracChangeset
for help on using the changeset viewer.