s4:lib/messaging: terminate the irpc_servers_byname() result with server_id_set_disco...
[Samba/gebeck_regimport.git] / buildtools / wafadmin / Tools / icc.py
blob9c9a92602c75fb4429d836aee19f8a90db14e241
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # Stian Selnes, 2008
4 # Thomas Nagy 2009
6 import os, sys
7 import Configure, Options, Utils
8 import ccroot, ar, gcc
9 from Configure import conftest
11 @conftest
12 def find_icc(conf):
13 if sys.platform == 'cygwin':
14 conf.fatal('The Intel compiler does not work on Cygwin')
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)
25 ccroot.get_cc_version(conf, cc, icc=True)
26 v['CC'] = cc
27 v['CC_NAME'] = 'icc'
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 '''