Compile tests with CMake.

This commit is contained in:
Susi Lehtola 2015-11-13 19:33:32 +01:00
parent 52e16fbe81
commit bbcef80e63

View File

@ -62,9 +62,9 @@ xsltproc --nonet -o man/manual.html \
mkdir objdir-%{_target_platform} mkdir objdir-%{_target_platform}
cd objdir-%{_target_platform} cd objdir-%{_target_platform}
# Upstream doesn't support shared libraries (unversioned solib) # Upstream doesn't support shared libraries (unversioned solib)
%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=1 -DBUILD_SHARED_LIBS:BOOL=OFF %cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=1 -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1
# SMP make doesn't seem to work # SMP make doesn't seem to work
make make cppcheck
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
@ -81,13 +81,8 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
install -D -p -m 644 gui/icon.png %{buildroot}%{_datadir}/pixmaps/cppcheck.png install -D -p -m 644 gui/icon.png %{buildroot}%{_datadir}/pixmaps/cppcheck.png
%check %check
# CMake build doesn't have check... cd objdir-%{_target_platform}/bin
CXXFLAGS="%{optflags} -DNDEBUG $(pcre-config --cflags)" \ ./testrunner -g -q
LDFLAGS="$RPM_LD_FLAGS" LIBS=-ltinyxml2 make TINYXML= \
CFGDIR=$(pwd)/cfg \
HAVE_RULES=yes \
DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl \
%{?_smp_mflags} check
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -107,6 +102,7 @@ rm -rf %{buildroot}
%changelog %changelog
* Fri Nov 13 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-4 * Fri Nov 13 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-4
- Link whole archive (BZ #1280242), patch by Mamoru Tasaka. - Link whole archive (BZ #1280242), patch by Mamoru Tasaka.
- Compile and run tests using CMake.
* Wed Nov 11 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-3 * Wed Nov 11 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-3
- Enable HAVE_RULES. - Enable HAVE_RULES.