Add gcov environment 01/189701/1
authorSeokHoon Lee <andy.shlee@samsung.com>
Thu, 20 Sep 2018 02:54:22 +0000 (11:54 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Thu, 20 Sep 2018 02:54:43 +0000 (11:54 +0900)
Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I55ed9e797539edef3f82a52b50b6ba308abee5b0

packaging/capi-media-radio.spec

index 4e9d161..b351ee0 100644 (file)
@@ -30,6 +30,12 @@ A Radio library in Tizen Native API (Development).
 cp %{SOURCE1001} .
 
 %build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake .  -DFULLVER=%{version} -DMAJORVER=${MAJORVER}