Skip to content

Commit d0f111b

Browse files
authored
Replace JSON Toolkit, Noa, and AlterSchema with the new Core library (#873)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 0a80393 commit d0f111b

675 files changed

Lines changed: 151081 additions & 1531 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,10 @@ jobs:
108108
- run: cmake --build ./build --config Release --parallel 4
109109
- run: >
110110
cmake --install ./build --prefix ./build/dist --config Release --verbose
111-
--component sourcemeta_noa
111+
--component sourcemeta_core
112112
- run: >
113113
cmake --install ./build --prefix ./build/dist --config Release --verbose
114-
--component sourcemeta_noa_dev
115-
- run: >
116-
cmake --install ./build --prefix ./build/dist --config Release --verbose
117-
--component sourcemeta_jsontoolkit
118-
- run: >
119-
cmake --install ./build --prefix ./build/dist --config Release --verbose
120-
--component sourcemeta_jsontoolkit_dev
121-
- run: >
122-
cmake --install ./build --prefix ./build/dist --config Release --verbose
123-
--component sourcemeta_alterschema
124-
- run: >
125-
cmake --install ./build --prefix ./build/dist --config Release --verbose
126-
--component sourcemeta_alterschema_dev
114+
--component sourcemeta_core_dev
127115
- run: >
128116
cmake --install ./build --prefix ./build/dist --config Release --verbose
129117
--component sourcemeta_jsonbinpack

CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ option(JSONBINPACK_DOCS "Build the JSON BinPack documentation" OFF)
1717
option(JSONBINPACK_ADDRESS_SANITIZER "Build JSON BinPack with an address sanitizer" OFF)
1818
option(JSONBINPACK_UNDEFINED_SANITIZER "Build JSON BinPack with an undefined behavior sanitizer" OFF)
1919

20-
find_package(Noa REQUIRED)
20+
find_package(Core REQUIRED)
2121

2222
if(JSONBINPACK_INSTALL)
2323
include(GNUInstallDirs)
@@ -37,8 +37,7 @@ if(JSONBINPACK_INSTALL)
3737
endif()
3838

3939
# Dependencies
40-
find_package(JSONToolkit REQUIRED)
41-
find_package(AlterSchema REQUIRED)
40+
find_package(Core REQUIRED)
4241

4342
# Numeric
4443
if(JSONBINPACK_NUMERIC)
@@ -56,21 +55,21 @@ if(JSONBINPACK_COMPILER)
5655
endif()
5756

5857
if(JSONBINPACK_ADDRESS_SANITIZER)
59-
noa_sanitizer(TYPE address)
58+
sourcemeta_sanitizer(TYPE address)
6059
elseif(JSONBINPACK_UNDEFINED_SANITIZER)
61-
noa_sanitizer(TYPE undefined)
60+
sourcemeta_sanitizer(TYPE undefined)
6261
endif()
6362

6463
if(JSONBINPACK_DOCS)
65-
noa_target_doxygen(CONFIG "${PROJECT_SOURCE_DIR}/doxygen/Doxyfile.in"
64+
sourcemeta_target_doxygen(CONFIG "${PROJECT_SOURCE_DIR}/doxygen/Doxyfile.in"
6665
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/www")
6766
endif()
6867

6968
if(PROJECT_IS_TOP_LEVEL)
70-
noa_target_clang_format(SOURCES
69+
sourcemeta_target_clang_format(SOURCES
7170
src/*.h src/*.cc
7271
test/*.h test/*.cc)
73-
noa_target_clang_tidy(SOURCES
72+
sourcemeta_target_clang_tidy(SOURCES
7473
src/*.h src/*.cc)
7574
endif()
7675

DEPENDENCIES

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
vendorpull https://github.com/sourcemeta/vendorpull 70342aaf458e6cb80baeb5b718901075fc42ede6
2-
noa https://github.com/sourcemeta/noa dee6c859895baf918fe3ecca22e4e7a262c5d500
3-
jsontoolkit https://github.com/sourcemeta/jsontoolkit d3436cfa5546f5f5c01ffa2f2314aabd966a84ed
4-
alterschema https://github.com/sourcemeta/alterschema dfbc1f51d81ec231346c7e73f06c60cbaa7b0db6
2+
core https://github.com/sourcemeta/core 514001ace2da9444cfe2382a4134ed4cd773ce73
53
bootstrap https://github.com/twbs/bootstrap 1a6fdfae6be09b09eaced8f0e442ca6f7680a61e

Makefile

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,9 @@ compile: .always
2424
$(CMAKE) --build ./build --config $(PRESET) --target clang_format
2525
$(CMAKE) --build ./build --config $(PRESET) --parallel 4
2626
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
27-
--component sourcemeta_noa
27+
--component sourcemeta_core
2828
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
29-
--component sourcemeta_noa_dev
30-
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
31-
--component sourcemeta_jsontoolkit
32-
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
33-
--component sourcemeta_jsontoolkit_dev
34-
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
35-
--component sourcemeta_alterschema
36-
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
37-
--component sourcemeta_alterschema_dev
29+
--component sourcemeta_core_dev
3830
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \
3931
--component sourcemeta_jsonbinpack
4032
$(CMAKE) --install ./build --prefix ./build/dist --config $(PRESET) --verbose \

cmake/FindAlterSchema.cmake

Lines changed: 0 additions & 10 deletions
This file was deleted.

cmake/FindCore.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
if(NOT Core_FOUND)
2+
if(JSONBINPACK_INSTALL)
3+
set(SOURCEMETA_CORE_INSTALL ON CACHE BOOL "enable installation")
4+
else()
5+
set(SOURCEMETA_CORE_INSTALL OFF CACHE BOOL "disable installation")
6+
endif()
7+
8+
set(SOURCEMETA_CORE_JSONL OFF CACHE BOOL "disable JSONL support")
9+
set(SOURCEMETA_CORE_YAML OFF CACHE BOOL "disable YAML support")
10+
set(SOURCEMETA_CORE_CONTRIB_GOOGLETEST ${JSONBINPACK_TESTS} CACHE BOOL "GoogleTest")
11+
set(SOURCEMETA_CORE_CONTRIB_GOOGLEBENCHMARK ${JSONBINPACK_BENCHMARK} CACHE BOOL "GoogleBenchmark")
12+
add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/core")
13+
include(Sourcemeta)
14+
set(Core_FOUND ON)
15+
endif()

cmake/FindJSONToolkit.cmake

Lines changed: 0 additions & 12 deletions
This file was deleted.

cmake/FindNoa.cmake

Lines changed: 0 additions & 13 deletions
This file was deleted.

config.cmake.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ if(NOT JSONBINPACK_COMPONENTS)
1010
endif()
1111

1212
include(CMakeFindDependencyMacro)
13-
find_dependency(JSONToolkit COMPONENTS uri json jsonpointer jsonschema)
14-
find_dependency(AlterSchema COMPONENTS engine linter)
13+
find_dependency(Core COMPONENTS uri json jsonpointer jsonschema alterschema)
1514

1615
foreach(component ${JSONBINPACK_COMPONENTS})
1716
if(component STREQUAL "numeric")

doxygen/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ PROJECT_LOGO = @PROJECT_SOURCE_DIR@/doxygen/logo.png
5858
# entered, it will be relative to the location where doxygen was started. If
5959
# left blank the current directory will be used.
6060

61-
OUTPUT_DIRECTORY = @NOA_TARGET_DOXYGEN_OUTPUT@
61+
OUTPUT_DIRECTORY = @SOURCEMETA_TARGET_DOXYGEN_OUTPUT@
6262

6363
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
6464
# directories (in 2 levels) under the output directory of each output format and

0 commit comments

Comments
 (0)