Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a2f4dc00d81613e2d6b621fa6f72d1c3a6a590a7
[simgrid.git] / buildtools / Cmake / my_valgrind.pl
1 #!/usr/bin/perl -w
2 use strict;
3 my($arg)="";
4 my($val_path)="/usr/bin"; #By default
5 my($count)=0;
6
7 while($count!=$#ARGV+1)
8 {
9         print "arg($count)$ARGV[$count]\n";
10         if($ARGV[$count] eq "--cd"){
11                 print "cd $ARGV[$count+1]\n";
12                 chdir ($ARGV[$count+1]);
13                 $count++;
14         }
15         elsif($ARGV[$count] eq "--valgrind") {
16                 print "valgrind_path $ARGV[$count+1]\n";
17                 $val_path = $ARGV[$count+1];
18                 $count++;
19         }
20         else{
21                 $arg="$arg $ARGV[$count]";
22         }
23         $count++;
24 }
25
26 #print "COMMAND : $bin $option $cd $path\n";
27 #print "cd $path\n";
28 #print "$val_path\/valgrind --trace-children=yes --leak-check=full --show-reachable=yes --track-origins=yes --read-var-info=no $bin $option\n";
29 print "$val_path\/valgrind $arg\n\n";
30 system "$val_path\/valgrind $arg";