BuildRequires: bison
BuildRequires: gtest-devel
BuildRequires: pkgconfig(glib-2.0)
+%if 0%{?gcov:1}
+BuildRequires: lcov
+%endif
%description
Tizen Interface Definition Language
cp %{SOURCE1002} .
%build
-MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake -DFULLVER=%{version} \
- -DMAJORVER=${MAJORVER} \
- .
+%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 %{?_smp_mflags}
%install
%check
ctest --output-on-failure %{?_smp_mflags}
+%if 0%{?gcov:1}
+lcov -c --ignore-errors graph --no-external -q -d . -o gcov.info
+genhtml gcov.info
+%endif
%preun