# Regex to catch compiler commands.
my $cc_regex = qr/
- (?<!\.)(?:cc|gcc|g\+\+|c\+\+)
- (?:-[\d.]+)?
+ (?<!\.) # ignore file names, e.g. "test.gcc"
+ (?:cc|gcc|g\+\+|c\+\+)
+ (?:-[\d.]+)? # version suffix, e.g. "gcc-4.6"
/x;
# Full regex which matches the complete compiler name. Used in a few places to
# prevent false negatives.