From 6c7f7c810094e7d9a3126a1e777fea195f56297a Mon Sep 17 00:00:00 2001 From: Cengizhan Pasaoglu Date: Thu, 27 Apr 2023 09:16:10 +0300 Subject: [PATCH] Upgrade Google Benchmark version from 1.6.0 to 1.7.1 (#2116) --- bazel/repository.bzl | 6 +++--- ci/ports/benchmark/CONTROL | 5 ----- ci/ports/benchmark/portfile.cmake | 27 ++++++++++----------------- ci/ports/benchmark/vcpkg.json | 19 +++++++++++++++++++ third_party/benchmark | 2 +- third_party_release | 2 +- 6 files changed, 34 insertions(+), 27 deletions(-) delete mode 100644 ci/ports/benchmark/CONTROL create mode 100644 ci/ports/benchmark/vcpkg.json diff --git a/bazel/repository.bzl b/bazel/repository.bzl index d3605e36bf..daa9dcd3eb 100644 --- a/bazel/repository.bzl +++ b/bazel/repository.bzl @@ -34,10 +34,10 @@ def opentelemetry_cpp_deps(): maybe( http_archive, name = "com_github_google_benchmark", - sha256 = "1f71c72ce08d2c1310011ea6436b31e39ccab8c2db94186d26657d41747c85d6", - strip_prefix = "benchmark-1.6.0", + sha256 = "6430e4092653380d9dc4ccb45a1e2dc9259d581f4866dc0759713126056bc1d7", + strip_prefix = "benchmark-1.7.1", urls = [ - "https://github.com/google/benchmark/archive/v1.6.0.tar.gz", + "https://github.com/google/benchmark/archive/v1.7.1.tar.gz", ], ) diff --git a/ci/ports/benchmark/CONTROL b/ci/ports/benchmark/CONTROL deleted file mode 100644 index d82040748d..0000000000 --- a/ci/ports/benchmark/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: benchmark -Version: 1.5 -Homepage: https://github.com/google/benchmark -Description: A library to support the benchmarking of functions, similar to unit-tests. -Supports: !uwp \ No newline at end of file diff --git a/ci/ports/benchmark/portfile.cmake b/ci/ports/benchmark/portfile.cmake index 6716c34312..efb5a2fce7 100644 --- a/ci/ports/benchmark/portfile.cmake +++ b/ci/ports/benchmark/portfile.cmake @@ -6,38 +6,31 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() # Make sure vs2019 compiled binaries are compat with vs2017 -set(VCPKG_CXX_FLAGS "/Zc:__cplusplus /d2FH4-") -set(VCPKG_C_FLAGS "/Zc:__cplusplus /d2FH4-") - -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/benchmark - REF v1.5.0 - SHA512 a0df9aa3d03f676e302c76d83b436de36eea0a8517ab50a8f5a11c74ccc68a1f5128fa02474901002d8e6b5a4d290ef0272a798ff4670eab3e2d78dc86bb6cd3 + REF v1.7.1 + SHA512 396af1c1d3eaa2b78c6d23b1472f6088db85a294056ae1c2366dc5c0becdc8f141ba8fc3a235033324ab0a41c2298f5d242ef09b9b6f69d9877de6bcb2062efd HEAD_REF master ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DBENCHMARK_ENABLE_TESTING=OFF - -DCMAKE_DEBUG_POSTFIX=d ) -vcpkg_install_cmake() - +vcpkg_cmake_install() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/benchmark) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/benchmark) + +vcpkg_fixup_pkgconfig() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/benchmark) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/benchmark/LICENSE ${CURRENT_PACKAGES_DIR}/share/benchmark/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ci/ports/benchmark/vcpkg.json b/ci/ports/benchmark/vcpkg.json new file mode 100644 index 0000000000..605f5af9f0 --- /dev/null +++ b/ci/ports/benchmark/vcpkg.json @@ -0,0 +1,19 @@ +{ + "$comment": "https://github.com/google/benchmark/issues/661 describes the missing UWP support upstream", + "name": "benchmark", + "version-semver": "1.7.1", + "description": "A library to support the benchmarking of functions, similar to unit-tests.", + "homepage": "https://github.com/google/benchmark", + "license": "Apache-2.0", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] + } \ No newline at end of file diff --git a/third_party/benchmark b/third_party/benchmark index c05843a9f6..d572f47773 160000 --- a/third_party/benchmark +++ b/third_party/benchmark @@ -1 +1 @@ -Subproject commit c05843a9f622db08ad59804c190f98879b76beba +Subproject commit d572f4777349d43653b21d6c2fc63020ab326db2 diff --git a/third_party_release b/third_party_release index bffdd2137b..c8af81b0c4 100644 --- a/third_party_release +++ b/third_party_release @@ -16,7 +16,7 @@ gRPC=v1.49.2 thrift=0.14.1 abseil=20220623.1 -benchmark=v1.5.3 +benchmark=v1.7.1 googletest=release-1.12.1 ms-gsl=v3.1.0-67-g6f45293 nlohmann-json=v3.11.2