Skip to content

Commit

Permalink
Update rapidjson dependency to latest verrsion compatible with our fi…
Browse files Browse the repository at this point in the history
…nding, and apply a patch to fix cmake deprecation
  • Loading branch information
ptheywood committed Jan 4, 2024
1 parent 97149c1 commit eff2520
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 12 additions & 0 deletions cmake/dependencies/patches/rapidjson-cmake-3.5-deprecation.patch
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions cmake/dependencies/rapidjson.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit eff2520

Please sign in to comment.