[Codecov] Fix unit tests coverage report

Since gcc 8.1.0 release, source file is needed to generate correct coverage report.
New compilation flag `-fprofile-abs-path` was introduced to preserve correct path to source file in *.gcno file.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2021-03-28 00:33:15 +01:00
parent 7b7638ff91
commit af57456c69
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,8 @@ fi
if test x${enable_unit_tests} = xyes ; then if test x${enable_unit_tests} = xyes ; then
BOINC_CHECK_CFLAG(--coverage) BOINC_CHECK_CFLAG(--coverage)
BOINC_CHECK_CXXFLAG(--coverage) BOINC_CHECK_CXXFLAG(--coverage)
BOINC_CHECK_CFLAG(-fprofile-abs-path)
BOINC_CHECK_CXXFLAG(-fprofile-abs-path)
LDFLAGS="$LDFLAGS --coverage" LDFLAGS="$LDFLAGS --coverage"
fi fi