Logo AND Algorithmique Numérique Distribuée

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