Add gcov environment 06/189506/1 tizen_dev
authorSeokHoon Lee <andy.shlee@samsung.com>
Tue, 18 Sep 2018 08:09:02 +0000 (17:09 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Tue, 18 Sep 2018 08:09:21 +0000 (17:09 +0900)
Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I22f77c8cffa0ad72d5d377fa5cb1db43dc143e9b

packaging/capi-media-codec.spec

index 6f405a3..f74b8b7 100755 (executable)
@@ -47,6 +47,12 @@ Requires: %{name} = %{version}-%{release}
 
 export CFLAGS="$CFLAGS -DSYSCONFDIR=\\\"%{_sysconfdir}\\\""
 
+%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 . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}