VERSION: Bump version number up to 4.0.13...
[Samba.git] / buildtools / wafadmin / Tools / icpc.py
blob7d79c57e3093780967d1fd8606eb5ee630ab93f5
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # Thomas Nagy 2009
5 import os, sys
6 import Configure, Options, Utils
7 import ccroot, ar, gxx
8 from Configure import conftest
10 @conftest
11 def find_icpc(conf):
12 if sys.platform == 'cygwin':
13 conf.fatal('The Intel compiler does not work on Cygwin')
15 v = conf.env
16 cxx = None
17 if v['CXX']: cxx = v['CXX']
18 elif 'CXX' in conf.environ: cxx = conf.environ['CXX']
19 if not cxx: cxx = conf.find_program('icpc', var='CXX')
20 if not cxx: conf.fatal('Intel C++ Compiler (icpc) was not found')
21 cxx = conf.cmd_to_list(cxx)
23 ccroot.get_cc_version(conf, cxx, icc=True)
24 v['CXX'] = cxx
25 v['CXX_NAME'] = 'icc'
27 detect = '''
28 find_icpc
29 find_ar
30 gxx_common_flags
31 gxx_modifier_platform
32 cxx_load_tools
33 cxx_add_flags
34 link_add_flags
35 '''