Merge pull request #1825 from NeumannIMT/benchmark_update

Update google benchmark to current master version
This commit is contained in:
Robert Schumacher 2017-09-21 01:21:17 -07:00 committed by GitHub
commit 801f3c6be4
3 changed files with 14 additions and 33 deletions

View File

@ -1,3 +1,3 @@
Source: benchmark
Version: 1.1.0-1
Version: 1.2.0
Description: A library to support the benchmarking of functions, similar to unit-tests.

View File

@ -1,27 +0,0 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4038875..94d2aea 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -28,17 +28,20 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
endif()
# Expose public API
-target_include_directories(benchmark PUBLIC ${PROJECT_SOURCE_DIR}/include)
+target_include_directories(benchmark PRIVATE ${PROJECT_SOURCE_DIR}/include)
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
install(
TARGETS benchmark
+ EXPORT benchmarkTargets
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
- COMPONENT library)
+ INCLUDES DESTINATION include)
install(
DIRECTORY "${PROJECT_SOURCE_DIR}/include/benchmark"
DESTINATION include
FILES_MATCHING PATTERN "*.*h")
+
+install(EXPORT benchmarkTargets NAMESPACE benchmark:: DESTINATION share/benchmark)

View File

@ -12,30 +12,38 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/benchmark
REF v1.1.0
SHA512 533061531e6a37723a626addc9e779018c4c2cfc8634ae45860eec0d3800103b5b562f865ac1dc0c8dbe045579b81e59de887e1c48318cebf160f03c18321831
REF v1.2.0
SHA512 859063669fd84e847f04624013f0b2b734d75d90cada247682eaf345b86c88a9bc2320250e128f2361e37f402b3fb56a18c493ec6038973744a005a452d693ba
HEAD_REF master
)
vcpkg_download_distfile(PATCH
URLS "https://github.com/efcs/benchmark/commit/536b0b82b8ec12fc7e17e6d243633618f294a739.diff"
FILENAME google-benchmark-1.2.0-536b0b82.patch
SHA512 ed42cc0014741c8039c0fca5b4317b2ed09d06a25c91f49a48be6dce921e39469b002c088794c1ea73dc759166e20cb685b47f809ba28dddd95b5f3263be03cd
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch"
PATCHES
"${PATCH}"
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBENCHMARK_ENABLE_TESTING=OFF
-DBENCHMARK_ENABLE_TESTING=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/benchmark)
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)