Added a gcov flag to meaure line & function coverage.
[platform/core/api/smartcard.git] / packaging / capi-network-smartcard.spec
old mode 100755 (executable)
new mode 100644 (file)
index e03cb07..6ad4f1c
@@ -29,10 +29,14 @@ Requires: %{name} = %{version}-%{release}
 %setup -q
 
 %build
+%if 0%{?gcov:1}
+export LDFLAGS+=" -lgcov"
+%endif
+
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 
 cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} \
-        -DMAJORVER=${MAJORVER} -DCMAKE_LIB_DIR=%{_libdir} \
+        -DMAJORVER=${MAJORVER} -DCMAKE_LIB_DIR=%{_libdir} -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
 %ifarch %{arm}
        -DTIZEN_SMARTCARD_SUPPORT=1
 %endif