summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jamrules.jam6
-rw-r--r--tests/gcov-filter.pl7
2 files changed, 10 insertions, 3 deletions
diff --git a/Jamrules.jam b/Jamrules.jam
index db73c81..43d817f 100644
--- a/Jamrules.jam
+++ b/Jamrules.jam
@@ -2,7 +2,7 @@
actions ObjectAction
{
- %MINGW_PATH%\bin\gcc -W -Wall -Wextra -Werror -ansi -pedantic -c $(>) -o $(<) $(CCFLAGS)
+ %MINGW_PATH%\bin\gcc -W -Wall -Wextra -Werror -pedantic -c $(>) -o $(<) $(CCFLAGS)
}
actions LibraryAction
@@ -17,7 +17,7 @@ actions LinkAction
actions CoverageAction
{
- %MINGW_PATH%\bin\gcov $(>:\\) $(GCOVFLAGS)
+ %MINGW_PATH%\bin\gcov $(>:\\) $(GCOVFLAGS) | perl tests/gcov-filter.pl
}
actions RunAction
@@ -106,7 +106,7 @@ rule Application TARGET : SOURCES : LIBRARIES
# build application
MakeFileDir $(EXECUTABLE) ;
LinkAction $(EXECUTABLE) : $(OBJECTS) ;
- Depends $(EXECUTABLE) : $(OBJECTS) $(LIBRARIES) ;
+ Depends $(EXECUTABLE) : $(OBJECTS) $($(LIBRARIES)_path) ;
# make alias
Alias $(TARGET) : $(EXECUTABLE) ;
diff --git a/tests/gcov-filter.pl b/tests/gcov-filter.pl
new file mode 100644
index 0000000..8a581d0
--- /dev/null
+++ b/tests/gcov-filter.pl
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+
+$lines = join('', <>);
+$lines =~ s/File (.+)\nLines (.+)\n(.+\n)*\n/$1 $2\n/g;
+$lines =~ s/.+include\/c\+\+.+\n//g;
+
+print $lines;