deps: update nbytes and add update script · nodejs/node@1ad6649 · GitHub
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 <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent b313949 commit 1ad6649

15 files changed

Lines changed: 424 additions & 226 deletions

File tree

.github/workflows/tools.yml

Lines changed: 9 additions & 0 deletions

deps/nbytes/.clang-format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BasedOnStyle: Google
2+
SortIncludes: Never

deps/nbytes/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cmake-build-debug
2+
build

deps/nbytes/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

deps/nbytes/CMakeLists.txt

Lines changed: 42 additions & 0 deletions
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

Lines changed: 21 additions & 0 deletions

0 commit comments

Comments
 (0)