From 78c888d139a40b58b10a2c92829cbb2c814ad766 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 15 Nov 2023 01:10:16 -0500 Subject: [PATCH] cpp-common: move `nlohmann/json.hpp` to `vendor` Signed-off-by: Philippe Proulx Change-Id: Idb5725a6a4655cee2f99300308b45236300134e2 Reviewed-on: https://review.lttng.org/c/babeltrace/+/11394 Reviewed-by: Simon Marchi CI-Build: Simon Marchi Tested-by: jenkins --- src/Makefile.am | 2 +- src/cpp-common/{ => vendor}/nlohmann/json.hpp | 0 tests/lib/conds/utils.cpp | 2 +- tools/format-cpp.sh | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) rename src/cpp-common/{ => vendor}/nlohmann/json.hpp (100%) diff --git a/src/Makefile.am b/src/Makefile.am index cf315687..e323856b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -56,7 +56,7 @@ noinst_HEADERS = \ cpp-common/bt2s/make-unique.hpp \ cpp-common/bt2s/optional.hpp \ cpp-common/bt2s/string-view.hpp \ - cpp-common/nlohmann/json.hpp \ + cpp-common/vendor/nlohmann/json.hpp \ cpp-common/vendor/optional-lite/optional.hpp \ cpp-common/vendor/string_view-standalone/string_view.hpp diff --git a/src/cpp-common/nlohmann/json.hpp b/src/cpp-common/vendor/nlohmann/json.hpp similarity index 100% rename from src/cpp-common/nlohmann/json.hpp rename to src/cpp-common/vendor/nlohmann/json.hpp diff --git a/tests/lib/conds/utils.cpp b/tests/lib/conds/utils.cpp index c5992e3b..7a70e72f 100644 --- a/tests/lib/conds/utils.cpp +++ b/tests/lib/conds/utils.cpp @@ -14,7 +14,7 @@ #include #include "common/assert.h" -#include "cpp-common/nlohmann/json.hpp" +#include "cpp-common/vendor/nlohmann/json.hpp" #include "../utils/run-in.hpp" #include "utils.hpp" diff --git a/tools/format-cpp.sh b/tools/format-cpp.sh index 754b04d2..be9ef74c 100755 --- a/tools/format-cpp.sh +++ b/tools/format-cpp.sh @@ -45,7 +45,6 @@ format_cpp() { # files in specific subdirectories. find "$(realpath "$root_dir")" \( -name '*.cpp' -o -name '*.hpp' \) \ ! -path '*/src/cpp-common/vendor/*' \ - ! -path '*/src/cpp-common/nlohmann/json.hpp' \ ! -path '*/src/plugins/ctf/common/metadata/parser.*' \ ! -path '*/src/plugins/ctf/common/metadata/lexer.*' \ -print0 | xargs -P"$(nproc)" -n1 -t -0 "${formatter[@]}" -- 2.34.1