File: icpc.py

package info (click to toggle)
talloc 2.0.7%2Bgit20120207-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,212 kB
  • sloc: python: 19,292; ansic: 10,476; sh: 3,271; xml: 801; makefile: 136; perl: 118; awk: 57
file content (35 lines) | stat: -rw-r--r-- 749 bytes parent folder | download | duplicates (37)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy 2009

import os, sys
import Configure, Options, Utils
import ccroot, ar, gxx
from Configure import conftest

@conftest
def find_icpc(conf):
	if sys.platform == 'cygwin':
		conf.fatal('The Intel compiler does not work on Cygwin')

	v = conf.env
	cxx = None
	if v['CXX']: cxx = v['CXX']
	elif 'CXX' in conf.environ: cxx = conf.environ['CXX']
	if not cxx: cxx = conf.find_program('icpc', var='CXX')
	if not cxx: conf.fatal('Intel C++ Compiler (icpc) was not found')
	cxx = conf.cmd_to_list(cxx)

	ccroot.get_cc_version(conf, cxx, icc=True)
	v['CXX'] = cxx
	v['CXX_NAME'] = 'icc'

detect = '''
find_icpc
find_ar
gxx_common_flags
gxx_modifier_platform
cxx_load_tools
cxx_add_flags
link_add_flags
'''