Remove gtest dependency and turn off tests

Resolves: #1977656
This commit is contained in:
Honza Horak 2021-07-15 15:42:04 +02:00
parent 8f82d181cd
commit da3ee8174d

View File

@ -1,8 +1,10 @@
%global debug_package %{nil}
%bcond_with gtest
Name: rapidjson
Version: 1.1.0
Release: 17%{?dist}
Release: 18%{?dist}
Summary: Fast JSON parser and generator for C++
License: MIT
@ -15,7 +17,9 @@ Patch1: rapidjson-1.1.0-c++20.patch
BuildRequires: cmake make
BuildRequires: gcc-c++
%if %{with gtest}
BuildRequires: gtest-devel
%endif
BuildRequires: valgrind
BuildRequires: doxygen
@ -84,7 +88,9 @@ find . -type f -name CMakeLists.txt -print0 | \
%build
%cmake -DDOC_INSTALL_DIR=%{_pkgdocdir} -DGTESTSRC_FOUND=TRUE -DGTEST_SOURCE_DIR=.
%cmake -DDOC_INSTALL_DIR=%{_pkgdocdir} \
%{?with_gtest:-DGTESTSRC_FOUND=TRUE -DGTEST_SOURCE_DIR=.} \
%{!?with_gtest:-DRAPIDJSON_BUILD_TESTS=OFF}
%cmake_build
@ -94,8 +100,10 @@ cp -a CHANGELOG.md readme*.md %{buildroot}%{_pkgdocdir}
find %{buildroot} -type f -name 'CMake*.txt' -delete
%if %{with gtest}
%check
%ctest
%endif
%files devel
@ -114,6 +122,10 @@ find %{buildroot} -type f -name 'CMake*.txt' -delete
%changelog
* Thu Jul 15 2021 Honza Horak <hhorak@redhat.com> - 1.1.0-18
- Remove gtest dependency and turn off tests
Resolves: #1977656
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.0-17
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937