From 8a6a652882dcf2bb6786daff5252de9fef1970b6 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Thu, 17 Apr 2025 04:44:11 +0000 Subject: [PATCH] fix build: Get rid of databento's internal nlohmann-json ** Migrate nlohmann-json over to vcpkg in the process ** Make it so databento is built with the same nlohmann-json lib that our code is built with. Recently, I started getting undefined symbol errors in databento code from nlohmann headers - presumably a conflict between their nlohmann dep and ours. --- CMakePresets.json | 4 ++++ externals | 2 +- vcpkg.json | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 512909dba..671dff6aa 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -65,6 +65,10 @@ "CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}", "CMAKE_EXE_LINKER_FLAGS": "-Wno-undef", "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake", + "DATABENTO_USE_EXTERNAL_JSON": { + "type": "BOOL", + "value": "ON" + }, "EXTERNALS_ROOT": "${sourceDir}/externals/linux", "BUILD_SDK": { "type": "BOOL", diff --git a/externals b/externals index a5e980e65..16f95fee2 160000 --- a/externals +++ b/externals @@ -1 +1 @@ -Subproject commit a5e980e650c52faa66b0a07f3081a5a13c47d22d +Subproject commit 16f95fee24500c47b847ff9b2fa9ad54402f4b6f diff --git a/vcpkg.json b/vcpkg.json index b7bded8c4..e1bc528f8 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -2,7 +2,8 @@ "dependencies": [ "fmt", "catch2", - "openssl" + "openssl", + "nlohmann-json" ], "builtin-baseline": "bb002e69deb36c00e9ce21810f69eff349a833f7", "overrides": [