Changeset 2232 for trunk/tsuite

Show
Ignore:
Timestamp:
07/19/08 09:37:32 (6 months ago)
Author:
gary
Message:

clean up run_programs.pl script - make gcc the default

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tsuite/programs/run_programs.pl

    r2228 r2232  
    11#!usr/bin/perl -w 
    2 #This progarm reads in the names of all the program files  
    3 #in run_programs.dat and compiles and links them 
     2# This progarm reads in the names of all the program files  
     3# in the file run_programs.da, compiles and links them, then runs the tests 
    44 
    55# 1 for gcc, 0 for icc 
    6 $UseGcc = 0; # icc 
     6$UseGcc = 0; # icl - a special case 
    77$UseGcc = 1; # g++ 
    88 
    9 # location of source and object files 
     9# location of source files 
    1010$DirSource  = "../../../source/"; 
    1111 
     
    2626open(RSOM,"$rsome") or die "could not open $rsome \n"; 
    2727 
    28 #Reading in the input file names that are to be executed 
     28# read the program names that are to be executed, each is in a directory of the same name 
    2929while($r=<RSOM>) 
    3030{ 
     
    3434     $r=~s/\n//;  #removing any newline characters 
    3535     chdir( $r ) or die "could not change to $r \n"; 
    36      $out=$r;     #giving name of output file same as the input file. 
    37      $out=~s/\.in/.out/gi; 
    3836     # compile the program 
    39      print "Compiling $out\n"; 
     37     print "Compiling $r\n"; 
    4038     if( $UseGcc ) 
    4139     { 
    42         system( "g++  $out.cpp -I \"$DirSource\" \"$DirObject\"/*.o  -lm  "); 
     40        system( "g++  $r.cpp -I \"$DirSource\" \"$DirObject\"/*.o  -lm  "); 
    4341        $exec = "a.exe" ; 
    4442     } 
    4543     else 
    4644     { 
    47         system( "icl  $out.cpp /I\"$DirSource\" \"$DirObject\"*.obj  "); 
    48         $exec = "$out.exe" ; 
     45        system( "icl  $r.cpp /I\"$DirSource\" \"$DirObject\"*.obj  "); 
     46        $exec = "$r.exe" ; 
    4947     } 
    50      print "done.\n now execute it.\n"; 
     48     print "done.\n now execute $exec \n"; 
    5149     system( "$exec"); 
    5250     chdir( ".." ) or die "could not return home \n";