Updated to version 1.6.1.

This commit is contained in:
Vitaly Zaitsev 2022-01-13 13:17:18 +01:00
parent cf63dce897
commit 0e110c2f1f
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A
5 changed files with 9 additions and 85 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@
/google-benchmark-1.5.5.tar.gz
/google-benchmark-1.5.6.tar.gz
/google-benchmark-1.6.0.tar.gz
/google-benchmark-1.6.1.tar.gz

View File

@ -1,46 +0,0 @@
From 1bd8098d3d5b7aa8e305e57b2451ab8f98a58965 Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly@easycoding.org>
Date: Wed, 8 Sep 2021 19:40:25 +0200
Subject: [PATCH] Optimized docs installation (#1225)
* Use GNUInstallDirs to install docs.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
* Added an option to disable docs installation.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
---
CMakeLists.txt | 1 +
src/CMakeLists.txt | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49f2ae2a0..d32dbd83d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,7 @@ else()
set(BENCHMARK_BUILD_32_BITS OFF CACHE BOOL "Build a 32 bit version of the library - unsupported when using MSVC)" FORCE)
endif()
option(BENCHMARK_ENABLE_INSTALL "Enable installation of benchmark. (Projects embedding benchmark may want to turn this OFF.)" ON)
+option(BENCHMARK_INSTALL_DOCS "Enable installation of documentation." ON)
# Allow unmet dependencies to be met using CMake's ExternalProject mechanics, which
# may require downloading the source code.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1df8a4aa8..19ff8857a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -118,7 +118,9 @@ if (BENCHMARK_ENABLE_INSTALL)
NAMESPACE "${namespace}"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
- install(
- DIRECTORY "${PROJECT_SOURCE_DIR}/docs/"
- DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
+ if (BENCHMARK_INSTALL_DOCS)
+ install(
+ DIRECTORY "${PROJECT_SOURCE_DIR}/docs/"
+ DESTINATION "${CMAKE_INSTALL_DOCDIR}")
+ endif()
endif()

View File

@ -1,31 +0,0 @@
From e8619813072f8eb7cf2d0e30b331c791405f5fef Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly@easycoding.org>
Date: Wed, 8 Sep 2021 19:41:07 +0200
Subject: [PATCH] Added support of packaged GTest for running unit tests.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
---
CMakeLists.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49f2ae2a0..0570d050d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -307,7 +307,15 @@ if (BENCHMARK_ENABLE_TESTING)
if (BENCHMARK_ENABLE_GTEST_TESTS AND
NOT (TARGET gtest AND TARGET gtest_main AND
TARGET gmock AND TARGET gmock_main))
- include(GoogleTest)
+ find_package(GTest QUIET)
+ if (GTEST_FOUND)
+ add_library(gtest ALIAS GTest::gtest)
+ add_library(gtest_main ALIAS GTest::gtest_main)
+ add_library(gmock ALIAS GTest::gmock)
+ add_library(gmock_main ALIAS GTest::gmock_main)
+ else()
+ include(GoogleTest)
+ endif()
endif()
add_subdirectory(test)
endif()

View File

@ -4,7 +4,7 @@
%global lbname lib%{intname}
Name: google-benchmark
Version: 1.6.0
Version: 1.6.1
Release: 1%{?dist}
License: ASL 2.0
@ -12,17 +12,12 @@ Summary: A microbenchmark support library
URL: https://github.com/google/%{intname}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# https://github.com/google/benchmark/pull/1226
Patch100: %{name}-packaged-gtest.patch
# https://github.com/google/benchmark/pull/1225
Patch101: %{name}-docs-installation.patch
BuildRequires: gtest-devel
BuildRequires: gmock-devel
BuildRequires: ninja-build
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc
%description
@ -51,7 +46,9 @@ sed -e '/get_git_version/d' -e '/-Werror/d' -i CMakeLists.txt
%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 \
@ -79,6 +76,9 @@ sed -e '/get_git_version/d' -e '/-Werror/d' -i CMakeLists.txt
%{_docdir}/%{intname}/
%changelog
* Thu Jan 13 2022 Vitaly Zaitsev <vitaly@easycoding.org> - 1.6.1-1
- Updated to version 1.6.1.
* Sun Sep 12 2021 Vitaly Zaitsev <vitaly@easycoding.org> - 1.6.0-1
- Updated to version 1.6.0.

View File

@ -1 +1 @@
SHA512 (google-benchmark-1.6.0.tar.gz) = 83788f64322067cedca4e459dd2b4117a80d3dc480e1ce0a4d9c323827e13cb1969889a6049cd487dc28ecb0ff52c868a73492c738283ee1236e527b0ca8b11d
SHA512 (google-benchmark-1.6.1.tar.gz) = 7d3e3baf5a2d92e9552ab5007c37253b3510ac269edf8922a2794ff3dfbd0bf5b4c519240d4577b1ec30ef9e8a64caa17a809054c3dc7f2b1bcd410596177d67