~ubuntu-branches/ubuntu/trusty/ldb/trusty-proposed

« back to all changes in this revision

Viewing changes to buildtools/wafadmin/Tools/icc.py

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2012-02-07 16:04:26 UTC
  • mfrom: (1.3.11)
  • Revision ID: package-import@ubuntu.com-20120207160426-hz17vq8gs1epwkf2
Tags: 1:1.1.4+git20120206-1
* New upstream snapshot.
 + Extracts waf source code. Closes: #654482
 + Disable tdb2 support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
# encoding: utf-8
 
3
# Stian Selnes, 2008
 
4
# Thomas Nagy 2009
 
5
 
 
6
import os, sys
 
7
import Configure, Options, Utils
 
8
import ccroot, ar, gcc
 
9
from Configure import conftest
 
10
 
 
11
@conftest
 
12
def find_icc(conf):
 
13
        if sys.platform == 'cygwin':
 
14
                conf.fatal('The Intel compiler does not work on Cygwin')
 
15
 
 
16
        v = conf.env
 
17
        cc = None
 
18
        if v['CC']: cc = v['CC']
 
19
        elif 'CC' in conf.environ: cc = conf.environ['CC']
 
20
        if not cc: cc = conf.find_program('icc', var='CC')
 
21
        if not cc: cc = conf.find_program('ICL', var='CC')
 
22
        if not cc: conf.fatal('Intel C Compiler (icc) was not found')
 
23
        cc = conf.cmd_to_list(cc)
 
24
 
 
25
        ccroot.get_cc_version(conf, cc, icc=True)
 
26
        v['CC'] = cc
 
27
        v['CC_NAME'] = 'icc'
 
28
 
 
29
detect = '''
 
30
find_icc
 
31
find_ar
 
32
gcc_common_flags
 
33
gcc_modifier_platform
 
34
cc_load_tools
 
35
cc_add_flags
 
36
link_add_flags
 
37
'''