File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2+ index a891ce8..b8d8a3e 100644
3+ --- a/CMakeLists.txt
4+ +++ b/CMakeLists.txt
5+ @@ -1,4 +1,4 @@
6+ - CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
7+ + CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
8+ if(POLICY CMP0025)
9+ # detect Apple's Clang
10+ cmake_policy(SET CMP0025 NEW)
Original file line number Diff line number Diff line change @@ -84,12 +84,16 @@ else()
8484 # The triton code here https://github.com/triton-inference-server/common/blob/main/CMakeLists.txt is using
8585 # RAPIDJSON_INCLUDE_DIRS so the build fails if a newer RapidJSON version is used. It will find the package but the
8686 # include path will be wrong so the build error is delayed/misleading and non-trivial to understand/resolve.
87+ #
88+ # Patch RapidJSON to update cmake_minimum_required from 2.8 to 3.5 to fix build with newer CMake versions.
8789 set (RapidJSON_PREFIX ${CMAKE_CURRENT_BINARY_DIR} /_deps/rapidjson)
8890 set (RapidJSON_INSTALL_DIR ${RapidJSON_PREFIX} /install )
91+ set (rapidjson_patch_command patch --verbose -p1 -i ${PROJECT_SOURCE_DIR} /cmake/externals/rapidjson_cmake.patch)
8992 ExternalProject_Add(RapidJSON
9093 PREFIX ${RapidJSON_PREFIX}
9194 URL https://github.com/Tencent/rapidjson/archive/refs/tags/v1.1.0.zip
9295 URL_HASH SHA1=0fe7b4f7b83df4b3d517f4a202f3a383af7a0818
96+ PATCH_COMMAND ${rapidjson_patch_command}
9397 CMAKE_ARGS -DRAPIDJSON_BUILD_DOC=OFF
9498 -DRAPIDJSON_BUILD_EXAMPLES=OFF
9599 -DRAPIDJSON_BUILD_TESTS=OFF
You can’t perform that action at this time.
0 commit comments