Changeset 2209

Show
Ignore:
Timestamp:
07/12/08 10:13:00 (6 months ago)
Author:
peter
Message:

source/precompile.pl:

Fix failure to detect g++ version under openSUSE 11.0.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/precompile.pl

    r1490 r2209  
    33 
    44$version = `g++ --version`; 
    5 @v1 = split( / /, $version ); 
    6 @v2 = split( /\./, $v1[2] ); 
     5# remove comments in parentheses, they may or may not contain spaces 
     6$version =~ s/\(.*?\)//g; 
     7# at this point $version should look like "g++  x.y.z ...." 
     8@v1 = split( /\s+/, $version ); 
     9@v2 = split( /\./, $v1[1] ); 
    710# $v2[0] is major revision, $v2[1] is minor revision, $v2[2] is microversion 
    811# precompiling headers is supported from g++ 3.4.0 onwards