public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/google-benchmark] f44: Use the cmake declarative buildsystem
Date: Thu, 06 Aug 2026 05:54:10 GMT [thread overview]
Message-ID: <178599565082.1.7499907748859045685.rpms-google-benchmark-af48cef07223@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/google-benchmark
Branch : f44
Commit : af48cef0722385f4b8b1ddeee4f1f1c4e6d8d30f
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-05-17T16:28:47+01:00
Stats : +49/-61 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/google-benchmark/c/af48cef0722385f4b8b1ddeee4f1f1c4e6d8d30f?branch=f44
Log:
Use the cmake declarative buildsystem
---
diff --git a/google-benchmark.spec b/google-benchmark.spec
index 933edbf..6f31729 100644
--- a/google-benchmark.spec
+++ b/google-benchmark.spec
@@ -1,3 +1,5 @@
+%bcond ctest 1
+# Build with libpfm for hardware performance counter support?
%bcond libpfm 1
Name: google-benchmark
@@ -19,68 +21,24 @@ Source: %{url}/archive/v%{version}/benchmark-%{version}.tar.gz
# https://github.com/google/benchmark/issues/2173
Patch: 0001-In-PerfCountersTest.MultiThreaded-serialize-worker-t.patch
-BuildRequires: cmake
-BuildRequires: gcc
-BuildRequires: gcc-c++
-
-BuildRequires: cmake(GTest)
-BuildRequires: gmock-devel
-# Required for locale_impermeablity_test so the en_US.UTF-8 locale is valid.
-BuildRequires: glibc-langpack-en
-%if %{with libpfm}
-BuildRequires: libpfm-devel
-%endif
-
-%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}
-# Removed for Fedora 43; we can drop the Obsoletes after Fedora 45.
-Obsoletes: %{name}-doc < 1.9.4-9
-
-%description devel
-%{summary}.
-
-
-%prep
-%autosetup -n benchmark-%{version} -p1
-sed -e '/get_git_version/d' -e '/-Werror/d' -i CMakeLists.txt
-
-
-%conf
+BuildSystem: cmake
# Do not enable BENCHMARK_ENABLE_ASSEMBLY_TESTS, since it is for a very
# specific OS and compiler:
# https://github.com/google/benchmark/issues/1326#issuecomment-1015221235
-%cmake \
- -DCMAKE_BUILD_TYPE=Release \
- -DGIT_VERSION='%{version}' \
- -DBENCHMARK_DOWNLOAD_DEPENDENCIES:BOOL=OFF \
- -DBENCHMARK_ENABLE_DOXYGEN:BOOL=OFF \
- -DBENCHMARK_ENABLE_GTEST_TESTS:BOOL=ON \
- -DBENCHMARK_ENABLE_ASSEMBLY_TESTS:BOOL=OFF \
-%if %{with libpfm}
- -DBENCHMARK_ENABLE_LIBPFM:BOOL=ON \
-%endif
- -DBENCHMARK_ENABLE_INSTALL:BOOL=ON \
- -DBENCHMARK_ENABLE_TESTING:BOOL=ON \
- -DBENCHMARK_INSTALL_DOCS:BOOL=OFF \
- -DBENCHMARK_INSTALL_TOOLS:BOOL=OFF \
+BuildOption(conf): %{shrink:
+ -DCMAKE_BUILD_TYPE=Release
+ -DGIT_VERSION='%{version}'
+ -DBENCHMARK_DOWNLOAD_DEPENDENCIES:BOOL=OFF
+ -DBENCHMARK_ENABLE_DOXYGEN:BOOL=OFF
+ -DBENCHMARK_ENABLE_GTEST_TESTS:BOOL=%{?with_ctest:ON}%{?!with_ctest:OFF}
+ -DBENCHMARK_ENABLE_ASSEMBLY_TESTS:BOOL=OFF
+ -DBENCHMARK_ENABLE_LIBPFM:BOOL=%{?with_libfpm:ON}%{?!with_libfpm:OFF}
+ -DBENCHMARK_ENABLE_INSTALL:BOOL=ON
+ -DBENCHMARK_ENABLE_TESTING:BOOL=%{?with_ctest:ON}%{?!with_ctest:OFF}
+ -DBENCHMARK_INSTALL_DOCS:BOOL=OFF
+ -DBENCHMARK_INSTALL_TOOLS:BOOL=OFF
-DBENCHMARK_USE_BUNDLED_GTEST:BOOL=OFF
-
-
-%build
-%cmake_build
-
-
-%install
-%cmake_install
-
-
-%check
+ }
%ifarch s390x
# [BUG] Multiple PerfCountersTest failures with counter.num_counters() zero on
# some s390x systems
@@ -106,11 +64,41 @@ sed -e '/get_git_version/d' -e '/-Werror/d' -i CMakeLists.txt
# We don’t bother attempting to run the four tests that do succeed in
# perf_counters_gtest; it’s much more straightforward to just skip these two
# executables at the ctest level entirely, and little is lost by doing so.
-%ctest --exclude-regex '^perf_counters_g?test$'
-%else
-%ctest
+BuildOption(check): --exclude-regex '^perf_counters_g?test$'
%endif
+BuildRequires: gcc
+BuildRequires: gcc-c++
+
+%if %{with libpfm}
+BuildRequires: libpfm-devel
+%endif
+
+%if %{with ctest}
+BuildRequires: cmake(GTest)
+BuildRequires: gmock-devel
+# Required for locale_impermeablity_test so the en_US.UTF-8 locale is valid.
+BuildRequires: glibc-langpack-en
+%endif
+
+%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}
+# Removed for Fedora 43; we can drop the Obsoletes after Fedora 45.
+Obsoletes: %{name}-doc < 1.9.4-9
+
+%description devel
+%{summary}.
+
+
+%prep -a
+sed -e '/get_git_version/d' -e '/-Werror/d' -i CMakeLists.txt
+
%files
%license AUTHORS
reply other threads:[~2026-08-06 5:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178599565082.1.7499907748859045685.rpms-google-benchmark-af48cef07223@fedoraproject.org \
--to=code@musicinmybrain.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox