~david-ar/numpy.scons.support/checkfuncsatonce

« back to all changes in this revision

Viewing changes to numscons/core/compiler_detection.py

  • Committer: david
  • Date: 2008-08-08 19:39:34 UTC
  • Revision ID: david@evans-2.local-20080808193934-rxis2a3zvay1b6qb
Add basic info for compiler detection.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""This module implements detection of compilers types from their command
 
2
line."""
1
3
import re
2
4
 
3
5
from numscons.core.utils import popen_wrapper
4
6
from numscons.core.errors import UnknownCompiler
5
7
 
 
8
# How to detect a new compiler:
 
9
#   - implements a function is_*, which takes the (full) path of the compiler,
 
10
#   and returns a tuple (st, version), where st is a boolean set to True is the
 
11
#   given compiler is of the expected type, and version a string.
 
12
#   - the function is_ can use the function _parse
 
13
 
6
14
GNUCC = [re.compile('gcc version ([0-9-.]+)')]
7
15
ICC = [re.compile(r'Intel.*?C Compiler.*?Version ([0-9-.]+)')]
8
16
IFORT = [re.compile(r'Intel.*?Fortran Compiler.*?Version ([0-9-.]+)')]