Skip to content

Commit 196b42b

Browse files
committed
Replace the jinja2cpp with inja
1 parent c3ddafa commit 196b42b

10 files changed

+24
-186
lines changed

README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
* googlebenchmark
1919
* googletest
2020
* gperf
21+
* inja
2122
* jemalloc
22-
* jinja2cpp
2323
* ldap
2424
* libcurl
2525
* libdwarf
@@ -28,10 +28,7 @@
2828
* lz4
2929
* lzma
3030
* mstch
31-
* nonstd::expected-lite
32-
* nonstd::optional-lite
33-
* nonstd::string-view-lite
34-
* nonstd::variant-lite
31+
* nlohmann/json
3532
* openssl
3633
* proxygen
3734
* rocksdb

project/CMakeLists.txt

+4-7
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ set(ALL_TARGETS
216216
googlebenchmark
217217
googletest
218218
gperf
219+
inja
219220
jemalloc
220-
jinja2cpp
221221
ldap
222222
libcurl
223223
libdwarf
@@ -227,6 +227,7 @@ set(ALL_TARGETS
227227
lz4
228228
lzma
229229
mstch
230+
nlohmann-json
230231
openssl
231232
proxygen
232233
robin-hood-hashing
@@ -257,10 +258,6 @@ set(ALL_TARGETS
257258
openblas
258259
annoy
259260
libxml2
260-
expected-lite
261-
optional-lite
262-
string-view-lite
263-
variant-lite
264261
)
265262

266263
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
@@ -355,8 +352,8 @@ maybe_add_dependencies(grpc protobuf re2 c-ares openssl)
355352
maybe_add_dependencies(faiss openblas)
356353

357354
# JSON
358-
maybe_add_dependencies(valijson boost)
359-
maybe_add_dependencies(jinja2cpp boost fmt expected-lite string-view-lite optional-lite variant-lite)
355+
maybe_add_dependencies(valijson nlohmann-json)
356+
maybe_add_dependencies(inja nlohmann-json)
360357

361358
add_custom_target(
362359
clean-all

project/externals/boost.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ExternalProject_Add(
3131
CONFIGURE_COMMAND
3232
./bootstrap.sh
3333
--without-icu
34-
--with-libraries=context,thread,system,filesystem,graph,program_options,regex,iostreams,date_time,python,json
34+
--with-libraries=context,thread,system,filesystem,graph,program_options,regex,iostreams,date_time,python
3535
--prefix=${CMAKE_INSTALL_PREFIX}
3636
#--without-libraries=wave,nowide,chrono,atomic,fiber,type_erasure,exception,timer,contract,math,locale,json,test,stacktrace,mpi,log,graph,graph_parallel
3737
BUILD_COMMAND

project/externals/expected-lite.cmake renamed to project/externals/inja.cmake

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# Copyright (c) 2025 vesoft inc. All rights reserved.
22
#
3-
# This source code is licensed under BSL-1.0 License.
3+
# This source code is licensed under MIT License.
44

5-
set(name expected-lite)
5+
set(name inja)
66
set(source_dir ${CMAKE_CURRENT_BINARY_DIR}/${name}/source)
77
ExternalProject_Add(
88
${name}
9-
URL https://github.com/martinmoene/expected-lite/archive/refs/tags/v0.8.0.tar.gz
10-
URL_HASH MD5=01c630be299c57ccb6491a63cd0e1258
11-
DOWNLOAD_NAME ${name}-0.8.0.tar.gz
9+
URL https://github.com/pantor/inja/archive/34514c2658f809404b9a165591f242ee10250519.zip
10+
URL_HASH MD5=f537dae8df3993c89f2d677953d2b08a
11+
DOWNLOAD_NAME ${name}-master-2025-03-19.zip
1212
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/${name}
1313
TMP_DIR ${BUILD_INFO_DIR}
1414
STAMP_DIR ${BUILD_INFO_DIR}
1515
DOWNLOAD_DIR ${DOWNLOAD_DIR}
1616
SOURCE_DIR ${source_dir}
1717
CMAKE_ARGS
1818
${common_cmake_args}
19-
-DEXPECTED_LITE_OPT_BUILD_TESTS=OFF
20-
-DEXPECTED_LITE_OPT_BUILD_EXAMPLES=OFF
21-
-DEXPECTED_LITE_OPT_SELECT_STD=ON
19+
-DINJA_USE_EMBEDDED_JSON=OFF
20+
-DBUILD_TESTING=OFF
21+
-DBUILD_BENCHMARK=OFF
2222
-DCMAKE_BUILD_TYPE=Release
2323
BUILD_IN_SOURCE 1
2424
BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM}

project/externals/jinja2cpp.cmake

-43
This file was deleted.

project/externals/variant-lite.cmake renamed to project/externals/nlohmann-json.cmake

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# Copyright (c) 2025 vesoft inc. All rights reserved.
22
#
3-
# This source code is licensed under BSL-1.0 License.
3+
# This source code is licensed under MIT License.
44

5-
set(name variant-lite)
5+
set(name nlohmann-json)
66
set(source_dir ${CMAKE_CURRENT_BINARY_DIR}/${name}/source)
77
ExternalProject_Add(
88
${name}
9-
URL https://github.com/martinmoene/variant-lite/archive/7e3bce818adb69bab27ccb982ea1b6779c2e379e.zip
10-
URL_HASH MD5=b127526ab077edd2ba1f16ff2cc426f2
11-
DOWNLOAD_NAME ${name}-master.zip
9+
URL https://github.com/nlohmann/json/archive/3a5703931ad70852b668a46cac34354d1b264442.zip
10+
URL_HASH MD5=8c83312dd3fbf657e144be77799cfeba
11+
DOWNLOAD_NAME ${name}-develop-2025-03-29.tar.gz
1212
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/${name}
1313
TMP_DIR ${BUILD_INFO_DIR}
1414
STAMP_DIR ${BUILD_INFO_DIR}
1515
DOWNLOAD_DIR ${DOWNLOAD_DIR}
1616
SOURCE_DIR ${source_dir}
1717
CMAKE_ARGS
1818
${common_cmake_args}
19-
-DVARIANT_LITE_OPT_BUILD_TESTS=OFF
20-
-DVARIANT_LITE_OPT_BUILD_EXAMPLES=OFF
21-
-DVARIANT_LITE_OPT_SELECT_STD=ON
19+
-DNLOHMANN_JSON_CONFIG_INSTALL_DIR=${CMAKE_INSTALL_PREFIX}/lib/cmake/nlohmann_json
20+
-DJSON_BuildTests=OFF
21+
-DJSON_Install=ON
2222
-DCMAKE_BUILD_TYPE=Release
2323
BUILD_IN_SOURCE 1
2424
BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM}

project/externals/optional-lite.cmake

-40
This file was deleted.

project/externals/string-view-lite.cmake

-40
This file was deleted.

project/externals/valijson.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ExternalProject_Add(
1616
SOURCE_DIR ${source_dir}
1717
CMAKE_ARGS
1818
${common_cmake_args}
19+
-Dvalijson_USE_EXCEPTIONS=ON
1920
-Dvalijson_BUILD_EXAMPLES=OFF
2021
-Dvalijson_BUILD_TESTS=OFF
2122
-DCMAKE_BUILD_TYPE=Release

project/patches/jinja2cpp-1.3.2.patch

-34
This file was deleted.

0 commit comments

Comments
 (0)