Add gcov environment 03/189303/1 submit/tizen/20180918.081101
authorSeokHoon Lee <andy.shlee@samsung.com>
Mon, 17 Sep 2018 03:03:36 +0000 (12:03 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Mon, 17 Sep 2018 03:03:51 +0000 (12:03 +0900)
Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: If1601c82309a86c8697ee3f47cc5bbe1552a836b

packaging/capi-media-thumbnail-util.spec

index 7b1fd15..64c7550 100755 (executable)
@@ -37,6 +37,13 @@ A media thumbnail util library in Tizen Native API. (Development files included)
 export CFLAGS+=" -Wextra -Wno-array-bounds"
 export CFLAGS+=" -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow"
 export CFLAGS+=" -Wwrite-strings -Wswitch-default"
+%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}