Add gcov environment 49/189349/1
authorSeokHoon Lee <andy.shlee@samsung.com>
Mon, 17 Sep 2018 06:58:37 +0000 (15:58 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Mon, 17 Sep 2018 06:58:55 +0000 (15:58 +0900)
Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: Iebf3d0b004651029bc620f7fff8cabb71bde53e7

packaging/capi-media-video-util.spec

index f22bc85..b192626 100755 (executable)
@@ -36,6 +36,13 @@ A Video Utility library in Tizen Native API (Developement)
 cp %{SOURCE1001} .
 
 %build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
 make %{?jobs:-j%jobs}