Skip to content

Commit

Permalink
Upgrade Noa and JSON Toolkit to the latest versions
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Jan 21, 2025
1 parent 2aa105b commit 63d83fa
Show file tree
Hide file tree
Showing 561 changed files with 128,212 additions and 3,263 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ jobs:
- run: cmake --build ./build --config Release --target clang_format_test
- run: cmake --build ./build --config Release --parallel 4
- run: >
cmake --install ./build --prefix ./build/dist --config Release --verbose
--component sourcemeta_noa
- run: >
cmake --install ./build --prefix ./build/dist --config Release --verbose
--component sourcemeta_noa_dev
- run: >
cmake --install ./build --prefix ./build/dist --config Release --verbose
--component sourcemeta_jsontoolkit
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ format based on JSON Schema with \
both schema-driven and schema-less support."
HOMEPAGE_URL "https://jsonbinpack.sourcemeta.com")
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(vendor/noa/cmake/noa.cmake)

# Options
option(JSONBINPACK_NUMERIC "Build the JSON BinPack numeric library" ON)
Expand All @@ -19,6 +18,8 @@ option(JSONBINPACK_DOCS "Build the JSON BinPack documentation" OFF)
option(JSONBINPACK_ADDRESS_SANITIZER "Build JSON BinPack with an address sanitizer" OFF)
option(JSONBINPACK_UNDEFINED_SANITIZER "Build JSON BinPack with an undefined behavior sanitizer" OFF)

find_package(Noa REQUIRED)

if(JSONBINPACK_INSTALL)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
Expand Down Expand Up @@ -80,7 +81,6 @@ endif()

# Testing
if(JSONBINPACK_TESTS)
find_package(GoogleTest REQUIRED)
enable_testing()

if(JSONBINPACK_NUMERIC)
Expand Down
7 changes: 3 additions & 4 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
vendorpull https://github.com/sourcemeta/vendorpull 70342aaf458e6cb80baeb5b718901075fc42ede6
jsontoolkit https://github.com/sourcemeta/jsontoolkit 93a921d0f1e99bfdfe14bfd4d2acf5981294080b
alterschema https://github.com/sourcemeta/alterschema 0fcd3b3b921bd47dc0867477619383f6519939fa
googletest https://github.com/google/googletest 987e225614755fec7253aa95bf959c09e0d380d7
noa https://github.com/sourcemeta/noa a8d36453236abc365f08a76a486f92c84f976fd9
jsontoolkit https://github.com/sourcemeta/jsontoolkit 60a3862ad0d9642c97685f94aeaed96ab3509690
alterschema https://github.com/sourcemeta/alterschema 3579095980f5d53033a457725dd95eca27de96f4
bootstrap https://github.com/twbs/bootstrap 1a6fdfae6be09b09eaced8f0e442ca6f7680a61e
noa https://github.com/sourcemeta/noa 924f5cc8549af7f12227869dcbab4259029ac650
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ configure: .always
compile: .always
$(CMAKE) --build ./build --config $(PRESET) --target clang_format
$(CMAKE) --build ./build --config $(PRESET) --parallel 4
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
--component sourcemeta_noa
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
--component sourcemeta_noa_dev
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
--component sourcemeta_jsontoolkit
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
Expand Down
12 changes: 12 additions & 0 deletions cmake/FindNoa.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if(NOT Noa_FOUND)
if(JSONBINPACK_INSTALL)
set(NOA_INSTALL ON CACHE BOOL "enable Noa installation")
else()
set(NOA_INSTALL OFF CACHE BOOL "disable Noa installation")
endif()

set(NOA_GOOGLETEST ${JSONBINPACK_TESTS} CACHE BOOL "GoogleTest")
set(NOA_GOOGLEBENCHMARK OFF CACHE BOOL "GoogleBenchmark")
add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/noa")
set(Noa_FOUND ON)
endif()
32 changes: 14 additions & 18 deletions test/compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
add_executable(sourcemeta_jsonbinpack_compiler_unit
canonicalizer_test.cc compiler_test.cc
noa_googletest(NAMESPACE sourcemeta PROJECT jsonbinpack NAME compiler
FOLDER "JSON BinPack/Compiler"
SOURCES
canonicalizer_test.cc compiler_test.cc

2020_12_canonicalizer_any_test.cc
2020_12_canonicalizer_array_test.cc
2020_12_canonicalizer_boolean_test.cc
2020_12_canonicalizer_null_test.cc
2020_12_canonicalizer_number_test.cc
2020_12_canonicalizer_object_test.cc
2020_12_canonicalizer_string_test.cc
2020_12_canonicalizer_any_test.cc
2020_12_canonicalizer_array_test.cc
2020_12_canonicalizer_boolean_test.cc
2020_12_canonicalizer_null_test.cc
2020_12_canonicalizer_number_test.cc
2020_12_canonicalizer_object_test.cc
2020_12_canonicalizer_string_test.cc

2020_12_compiler_any_test.cc
2020_12_compiler_integer_test.cc
2020_12_compiler_number_test.cc)
2020_12_compiler_any_test.cc
2020_12_compiler_integer_test.cc
2020_12_compiler_number_test.cc)

noa_add_default_options(PRIVATE sourcemeta_jsonbinpack_compiler_unit)
target_link_libraries(sourcemeta_jsonbinpack_compiler_unit
PRIVATE GTest::gtest GTest::gtest_main)
target_link_libraries(sourcemeta_jsonbinpack_compiler_unit
PRIVATE sourcemeta::jsonbinpack::compiler)
target_link_libraries(sourcemeta_jsonbinpack_compiler_unit
PRIVATE sourcemeta::jsontoolkit::json)
target_link_libraries(sourcemeta_jsonbinpack_compiler_unit
PRIVATE sourcemeta::jsontoolkit::jsonschema)
gtest_discover_tests(sourcemeta_jsonbinpack_compiler_unit)
set_target_properties(sourcemeta_jsonbinpack_compiler_unit
PROPERTIES FOLDER "JSON BinPack/Compiler")
22 changes: 8 additions & 14 deletions test/numeric/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
add_executable(sourcemeta_jsonbinpack_numeric_unit
zigzag_test.cc
closest_smallest_exponent_test.cc
divide_ceil_test.cc
divide_floor_test.cc
uint_max_test.cc)
noa_googletest(NAMESPACE sourcemeta PROJECT jsonbinpack NAME numeric
FOLDER "JSON BinPack/Numeric"
SOURCES
zigzag_test.cc
closest_smallest_exponent_test.cc
divide_ceil_test.cc
divide_floor_test.cc
uint_max_test.cc)

noa_add_default_options(PRIVATE sourcemeta_jsonbinpack_numeric_unit)

target_link_libraries(sourcemeta_jsonbinpack_numeric_unit
PRIVATE GTest::gtest GTest::gtest_main)
target_link_libraries(sourcemeta_jsonbinpack_numeric_unit
PRIVATE sourcemeta::jsonbinpack::numeric)

gtest_discover_tests(sourcemeta_jsonbinpack_numeric_unit)
set_target_properties(sourcemeta_jsonbinpack_numeric_unit
PROPERTIES FOLDER "JSON BinPack/Numeric")
70 changes: 32 additions & 38 deletions test/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
add_executable(sourcemeta_jsonbinpack_runtime_unit
decode_any_test.cc
decode_array_test.cc
decode_integer_test.cc
decode_number_test.cc
decode_object_test.cc
decode_string_test.cc
decode_test.cc
decode_traits_test.cc
decode_utils.h
encode_any_test.cc
encode_array_test.cc
encode_cache_test.cc
encode_integer_test.cc
encode_number_test.cc
encode_object_test.cc
encode_real_test.cc
encode_string_test.cc
encode_test.cc
encode_traits_test.cc
encode_utils.h
input_stream_varint_test.cc
output_stream_varint_test.cc
encoding_traits_test.cc
v1_loader_test.cc
v1_any_loader_test.cc
v1_array_loader_test.cc
v1_integer_loader_test.cc
v1_number_loader_test.cc
v1_string_loader_test.cc)
noa_googletest(NAMESPACE sourcemeta PROJECT jsonbinpack NAME runtime
FOLDER "JSON BinPack/Runtime"
SOURCES
decode_any_test.cc
decode_array_test.cc
decode_integer_test.cc
decode_number_test.cc
decode_object_test.cc
decode_string_test.cc
decode_test.cc
decode_traits_test.cc
decode_utils.h
encode_any_test.cc
encode_array_test.cc
encode_cache_test.cc
encode_integer_test.cc
encode_number_test.cc
encode_object_test.cc
encode_real_test.cc
encode_string_test.cc
encode_test.cc
encode_traits_test.cc
encode_utils.h
input_stream_varint_test.cc
output_stream_varint_test.cc
encoding_traits_test.cc
v1_loader_test.cc
v1_any_loader_test.cc
v1_array_loader_test.cc
v1_integer_loader_test.cc
v1_number_loader_test.cc
v1_string_loader_test.cc)

noa_add_default_options(PRIVATE sourcemeta_jsonbinpack_runtime_unit)

target_link_libraries(sourcemeta_jsonbinpack_runtime_unit
PRIVATE GTest::gtest GTest::gtest_main)
target_link_libraries(sourcemeta_jsonbinpack_runtime_unit
PRIVATE sourcemeta::jsonbinpack::runtime)
target_link_libraries(sourcemeta_jsonbinpack_runtime_unit
PRIVATE sourcemeta::jsontoolkit::json)

gtest_discover_tests(sourcemeta_jsonbinpack_runtime_unit)
set_target_properties(sourcemeta_jsonbinpack_runtime_unit
PROPERTIES FOLDER "JSON BinPack/Runtime")
4 changes: 2 additions & 2 deletions vendor/alterschema/CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

105 changes: 105 additions & 0 deletions vendor/alterschema/vendor/noa/CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 63d83fa

Please sign in to comment.