# The subs are passed the message, and anything the regex captured.
+my $cc = shift(@ARGV);
+
my @msgfilters = (
[ qr/^(.*) warning: cannot pass objects of non-POD type `(.*)' through `\.\.\.'; call will abort at runtime/ => sub {
my ($msg, $where, $type) = @_;
[ qr/^.* error: / => sub {
my ($msg) = @_;
+ print STDERR "An error occured when executing:\e[37;1m $cc " . join(' ', @ARGV) . "\n";
print STDERR "\e[31;1m$msg\e[0m\n";
} ],
);
my ($r_stderr, $w_stderr);
-my $cc = shift(@ARGV);
+my $name = "";
+
+foreach my $n (@ARGV)
+{
+ if ($n =~ /\.cpp$/)
+ {
+ $name = $n;
+ }
+}
if (!defined($cc) || $cc eq "") {
die "Compiler not specified!\n";
die "Cannot fork to start gcc! $!\n" unless defined($pid);
if ($pid) {
+
+ print "\t\e[1;32mBUILD:\e[0m\t\t$name\n" unless $name eq "";
+
my $fail = 0;
# Parent - Close child-side pipes.
close $w_stderr;