source: waflib/Tools/compiler_cxx.py @ eadd8d5

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since eadd8d5 was 0fa325b, checked in by Paul Brossier <piem@piem.org>, 11 years ago

waf: unpack

  • Property mode set to 100644
File size: 1.7 KB
Line 
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
5import os,sys,imp,types
6from waflib.Tools import ccroot
7from waflib import Utils,Configure
8from waflib.Logs import debug
9cxx_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++']}
10def 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!')
30def 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)
Note: See TracBrowser for help on using the repository browser.