From af57456c698f472d22a633c83bd7d0bde66bf54c Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Sun, 28 Mar 2021 00:33:15 +0100 Subject: [PATCH] [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 --- m4/boinc_set_compile_flags.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/m4/boinc_set_compile_flags.m4 b/m4/boinc_set_compile_flags.m4 index 338f4cbf34..2a9708235b 100644 --- a/m4/boinc_set_compile_flags.m4 +++ b/m4/boinc_set_compile_flags.m4 @@ -121,6 +121,8 @@ fi if test x${enable_unit_tests} = xyes ; then BOINC_CHECK_CFLAG(--coverage) BOINC_CHECK_CXXFLAG(--coverage) + BOINC_CHECK_CFLAG(-fprofile-abs-path) + BOINC_CHECK_CXXFLAG(-fprofile-abs-path) LDFLAGS="$LDFLAGS --coverage" fi