blob: d2d891fdb3a740b7e84f6c471a9922889e9cc89d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
%global intname benchmark
%global lbname lib%{intname}
Name: google-benchmark
Version: 1.7.1
Release: 1
License: Apache-2.0
Summary: A microbenchmark support library
URL: https://github.com/google/%{intname}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: gtest-devel gmock-devel ninja-build gcc-c++ cmake doxygen gcc
%description
A library to support the benchmarking of functions, similar to unit-tests.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description devel
%{summary}.
%package_help
%prep
%autosetup -n %{intname}-%{version} -p1
sed -e '/get_git_version/d' -e '/-Werror/d' -i CMakeLists.txt
%build
%cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DGIT_VERSION=%{version} \
-DBENCHMARK_ENABLE_DOXYGEN:BOOL=ON \
-DBENCHMARK_ENABLE_TESTING:BOOL=ON \
-DBENCHMARK_USE_BUNDLED_GTEST:BOOL=OFF \
-DBENCHMARK_ENABLE_GTEST_TESTS:BOOL=ON \
-DBENCHMARK_ENABLE_INSTALL:BOOL=ON \
-DBENCHMARK_INSTALL_DOCS:BOOL=ON \
-DBENCHMARK_DOWNLOAD_DEPENDENCIES:BOOL=OFF
%ninja_build
%check
%ninja_test
%install
%ninja_install
%files
%doc CONTRIBUTING.md README.md
%license AUTHORS CONTRIBUTORS LICENSE
%{_libdir}/%{lbname}*.so.1*
%files devel
%{_libdir}/%{lbname}*.so
%{_includedir}/%{intname}/
%{_libdir}/cmake/%{intname}/
%{_libdir}/pkgconfig/%{intname}.pc
%files help
%{_docdir}/%{intname}/
%changelog
* Wed Sep 06 2023 Darssin <2020303249@mail.nwpu.edu.cn> - 1.7.1-1
- Package init
|