Skip to content

Commit

Permalink
[nanobench] Update to 4.3.7 (microsoft#24225)
Browse files Browse the repository at this point in the history
* [nanobench] Update to 4.3.7

* [nanobench] Update version files

* [nanobench] Fix build on window x86

* [nanobench] Update version files

* [nanobench] Add missing patch file

* [nanobench] Update version files
  • Loading branch information
RT2Code authored Apr 19, 2022
1 parent 9e3519a commit 8dd05eb
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 9 deletions.
21 changes: 21 additions & 0 deletions ports/nanobench/fix-cmakefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2f6089..d997097 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,9 +3,6 @@ project(nanobench LANGUAGES CXX)

# determine whether this is a standalone project or included by other projects
set(NANOBENCH_STANDALONE_PROJECT OFF)
-if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
- set(NANOBENCH_STANDALONE_PROJECT ON)
-endif()

if (NANOBENCH_STANDALONE_PROJECT)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # generate compile_commands.json
@@ -131,4 +128,6 @@ else()
add_library(nanobench::nanobench ALIAS nanobench)
set_property(TARGET nanobench PROPERTY CXX_STANDARD 17)
target_include_directories(nanobench PUBLIC ${PROJECT_SOURCE_DIR}/src/include)
+ install(TARGETS nanobench LIBRARY DESTINATION lib)
+ install(FILES src/include/nanobench.h DESTINATION include)
endif()
17 changes: 11 additions & 6 deletions ports/nanobench/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO martinus/nanobench
REF v4.3.6
SHA512 03e92a9fe903d273ee76c30bb6474c739858f0a65adebdcdd1e4b9ae294bd790a8e20161cb2d493fc1ea2987dbfa25a2a620cf7c3739d909595f81693f1f17d4
REF v4.3.7
SHA512 2f5b9573e220b507586c8586903489bd7dc2a8a09da07bd2454842a4c33c0323b0911ebeb902d5098c7dd9c96925d9bc3d4ca62fc5798f630b4b4d3e75d117a7
HEAD_REF master
PATCHES
fix-cmakefile.patch
)

file(
COPY ${SOURCE_PATH}/src/include/nanobench.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)

vcpkg_cmake_install()

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

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
16 changes: 14 additions & 2 deletions ports/nanobench/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{
"name": "nanobench",
"version": "4.3.6",
"version": "4.3.7",
"description": "Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20",
"homepage": "https://nanobench.ankerl.com",
"license": "MIT"
"license": "MIT",
"supports": "!uwp",
"dependencies": [
"fmt",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4733,7 +4733,7 @@
"port-version": 1
},
"nanobench": {
"baseline": "4.3.6",
"baseline": "4.3.7",
"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": "6353026a82baa4c84cc43554b4f518b8dbf79794",
"version": "4.3.7",
"port-version": 0
},
{
"git-tree": "b2078ee30dd4414efb21ecb3fe7c54efa854bc95",
"version": "4.3.6",
Expand Down

0 comments on commit 8dd05eb

Please sign in to comment.