cmake modules in gtest-devel needs libgmock.so.*

(cherry picked from commit c6c0f46428a1f625b703487332955307fa5fc3e5)
This commit is contained in:
Funda Wang 2024-07-11 20:48:24 +08:00 committed by openeuler-sync-bot
parent f8102d6e33
commit b9f8800d7d

View File

@ -1,8 +1,8 @@
Name: gtest
Version: 1.14.0
Release: 1
Release: 2
Summary: Google C++ testing framework
License: BSD and ASL 2.0
License: BSD-3-Clause and Apache-2.0
URL: https://github.com/google/googletest
Source0: https://github.com/google/googletest/archive/refs/tags/v%{version}.tar.gz
BuildRequires: gcc-c++ cmake python3-devel
@ -15,6 +15,7 @@ allowing unit-testing of C sources as well as C++ with minimal source modificati
%package -n gtest-devel
Summary: Gtest development files
Requires: gtest = %{version}-%{release}
Requires: gmock = %{version}-%{release}
%description -n gtest-devel
This package is libraries and head files for google testing framework.
@ -37,19 +38,16 @@ The package is libraries and head files for google mocking framework.
%autosetup -p1 -n googletest-%{version}
sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMakeLists.txt
%build
mkdir build && cd build
%cmake -DBUILD_SHARED_LIBS=ON -DPYTHON_EXECUTABLE=%{__python3} -Dgtest_build_tests=ON ..
%cmake -DBUILD_SHARED_LIBS=ON -DPYTHON_EXECUTABLE=%{__python3} -Dgtest_build_tests=ON -S.. -B.
%make_build
%install
cd build
%make_install
%make_install -C build
%check
cd build
make test
%make_build test -C build
%files
%license LICENSE
@ -75,6 +73,9 @@ make test
%{_libdir}/pkgconfig/gmock*
%changelog
* Thu Jul 11 2024 Funda Wang <fundawang@yeah.net> - 1.14.0-2
- cmake modules in gtest-devel needs libgmock.so.*
* Fri Aug 25 2023 wangkai <13474090681@163.com> - 1.14.0-1
- Update to 1.14.0