Skip to content

Commit

Permalink
[nanobench] Bump to 4.3.10 (microsoft#29468)
Browse files Browse the repository at this point in the history
* [nanobench] Bump to 4.3.10

* update version database

* apply suggested change

* update version database
  • Loading branch information
xiaozhuai authored Feb 7, 2023
1 parent 261f5b1 commit ea0c13e
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 31 deletions.
19 changes: 19 additions & 0 deletions ports/nanobench/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project(nanobench LANGUAGES CXX)

include(GNUInstallDirs)

add_library(nanobench INTERFACE)
target_include_directories(nanobench INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

install(TARGETS nanobench EXPORT nanobench)

install(
EXPORT nanobench
FILE nanobench-config.cmake
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/nanobench"
NAMESPACE nanobench::
)

install(FILES "${CMAKE_SOURCE_DIR}/src/include/nanobench.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
21 changes: 0 additions & 21 deletions ports/nanobench/fix-cmakefile.patch

This file was deleted.

15 changes: 8 additions & 7 deletions ports/nanobench/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
vcpkg_minimum_required(VERSION 2022-11-10)

# Header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO martinus/nanobench
REF v${VERSION}
SHA512 2d0c9e912fd2e777e3c75ac52d51daff720b51a776e5fc9f9d1e198f8b106bc13bd21219f195bf9c6c80b5a13fdb6b805c436d3060ec46fbd1f2ef67d58945db
SHA512 aa00dfc585445fda63b3ba1a802da259993b6b99d0bc2c9bb5f8a9dac64d25e9a61f072846d8f70ee2fea58482431749189179520ba7f6e075dbb223574a3a4d
HEAD_REF master
PATCHES
fix-cmakefile.patch
)

set(VCPKG_BUILD_TYPE release) # header-only port

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
4 changes: 4 additions & 0 deletions ports/nanobench/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nanobench provides CMake targets:

find_package(nanobench CONFIG REQUIRED)
target_link_libraries(main PRIVATE nanobench::nanobench)
3 changes: 1 addition & 2 deletions ports/nanobench/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "nanobench",
"version": "4.3.9",
"version": "4.3.10",
"description": "Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20",
"homepage": "https://nanobench.ankerl.com",
"license": "MIT",
"supports": "!uwp",
"dependencies": [
"fmt",
{
"name": "vcpkg-cmake",
"host": true
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5233,7 +5233,7 @@
"port-version": 1
},
"nanobench": {
"baseline": "4.3.9",
"baseline": "4.3.10",
"port-version": 0
},
"nanodbc": {
Expand Down
5 changes: 5 additions & 0 deletions versions/n-/nanobench.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "36edb6691f30882941ba28ae9fce39e251398466",
"version": "4.3.10",
"port-version": 0
},
{
"git-tree": "9c21c0e4b95602fd614f1ab27de25b1f3068472a",
"version": "4.3.9",
Expand Down

0 comments on commit ea0c13e

Please sign in to comment.