Skip to content

Commit 1ad6649

Browse files
anonrigaduh95
authored andcommitted
deps: update nbytes and add update script
PR-URL: #53790 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent b313949 commit 1ad6649

15 files changed

+424
-226
lines changed

.github/workflows/tools.yml

+9
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ on:
3131
- lint-md-dependencies
3232
- llhttp
3333
- minimatch
34+
- nbytes
3435
- nghttp2
3536
- nghttp3
3637
- ngtcp2
@@ -220,6 +221,14 @@ jobs:
220221
cat temp-output
221222
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
222223
rm temp-output
224+
- id: nbytes
225+
subsystem: deps
226+
label: dependencies
227+
run: |
228+
./tools/dep_updaters/update-nbytes.sh > temp-output
229+
cat temp-output
230+
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
231+
rm temp-output
223232
- id: nghttp2
224233
subsystem: deps
225234
label: dependencies

deps/nbytes/.clang-format

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BasedOnStyle: Google
2+
SortIncludes: Never

deps/nbytes/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cmake-build-debug
2+
build

deps/nbytes/.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

deps/nbytes/CMakeLists.txt

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
cmake_minimum_required(VERSION 3.28)
2+
project(nbytes)
3+
4+
set(CMAKE_CXX_STANDARD 20)
5+
set(CMAKE_CXX_STANDARD_REQUIRED True)
6+
if (NOT CMAKE_BUILD_TYPE)
7+
message(STATUS "No build type selected, default to Release")
8+
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
9+
endif()
10+
11+
option(NBYTES_DEVELOPMENT_CHECKS "Enable development checks" OFF)
12+
13+
include(GNUInstallDirs)
14+
include(FetchContent)
15+
16+
FetchContent_Declare(
17+
googletest
18+
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
19+
)
20+
# For Windows: Prevent overriding the parent project's compiler/linker settings
21+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
22+
FetchContent_MakeAvailable(googletest)
23+
24+
add_subdirectory(src)
25+
enable_testing()
26+
add_subdirectory(tests)
27+
28+
install(
29+
FILES include/nbytes.h
30+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
31+
COMPONENT nbytes_development
32+
)
33+
34+
install(
35+
TARGETS nbytes
36+
EXPORT nbytes_targets
37+
RUNTIME COMPONENT nbytes_runtime
38+
LIBRARY COMPONENT nbytes_runtime
39+
NAMELINK_COMPONENT nbytes_development
40+
ARCHIVE COMPONENT nbytes_development
41+
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
42+
)

deps/nbytes/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Node.js
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)