Skip to content

Commit ca9dfe7

Browse files
author
Sayan Shaw
committed
add triton and rapidjson patch
1 parent eebd5d5 commit ca9dfe7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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)

cmake/externals/triton.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)