From eff252037171e54f8ee2a5746045e234d8135971 Mon Sep 17 00:00:00 2001 From: Peter Heywood Date: Thu, 4 Jan 2024 14:03:59 +0000 Subject: [PATCH] Update rapidjson dependency to latest verrsion compatible with our finding, and apply a patch to fix cmake deprecation --- .../patches/rapidjson-cmake-3.5-deprecation.patch | 12 ++++++++++++ cmake/dependencies/rapidjson.cmake | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 cmake/dependencies/patches/rapidjson-cmake-3.5-deprecation.patch diff --git a/cmake/dependencies/patches/rapidjson-cmake-3.5-deprecation.patch b/cmake/dependencies/patches/rapidjson-cmake-3.5-deprecation.patch new file mode 100644 index 000000000..6fd163241 --- /dev/null +++ b/cmake/dependencies/patches/rapidjson-cmake-3.5-deprecation.patch @@ -0,0 +1,12 @@ +diff --git a/RapidJSONConfig.cmake.in b/RapidJSONConfig.cmake.in +index c25d3125..2e49514b 100644 +--- a/RapidJSONConfig.cmake.in ++++ b/RapidJSONConfig.cmake.in +@@ -1,6 +1,6 @@ + ################################################################################ + # CMake minimum version required +-cmake_minimum_required(VERSION 3.0) ++cmake_minimum_required(VERSION 3.5) + + ################################################################################ + # RapidJSON source dir diff --git a/cmake/dependencies/rapidjson.cmake b/cmake/dependencies/rapidjson.cmake index 1fe3e9cd6..ac6057e2e 100644 --- a/cmake/dependencies/rapidjson.cmake +++ b/cmake/dependencies/rapidjson.cmake @@ -7,12 +7,14 @@ include(FetchContent) include(ExternalProject) cmake_policy(SET CMP0079 NEW) -# Head of master as of 2020-07-14, as last release is ~500 commits behind head +# a95e013b97ca6523f32da23f5095fcc9dd6067e5 is the last commit before a change which breaks our method of finding rapid json without running a cmake install first. +# but we also need to patch this to avoid a cmake >= 3.26.4 deprecation FetchContent_Declare( rapidjson GIT_REPOSITORY https://github.com/Tencent/rapidjson.git - GIT_TAG f56928de85d56add3ca6ae7cf7f119a42ee1585b + GIT_TAG a95e013b97ca6523f32da23f5095fcc9dd6067e5 GIT_PROGRESS ON + PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/patches/rapidjson-cmake-3.5-deprecation.patch || true # UPDATE_DISCONNECTED ON ) FetchContent_GetProperties(rapidjson)