Skip to content

Commit 25e5a48

Browse files
committed
fix(client-cpp): CMake 4 Thrift policy and Session.cpp cstring
Pass CMAKE_POLICY_VERSION_MINIMUM=3.5 when configuring Thrift 0.21 on CMake 4.x (VS2026 CI). Include <cstring> in Session.cpp for memcpy/strlen/strstr on strict Linux builds.
1 parent 27fc230 commit 25e5a48

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

iotdb-client/client-cpp/cmake/FetchThrift.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ endif()
9595
# binary / library can immediately drive code generation and linking.
9696
# ---------------------------------------------------------------------------
9797
set(_thrift_cmake_args
98+
# CMake 4.x rejects Thrift 0.21's cmake_minimum_required(3.0); set policy first.
99+
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
98100
"-DCMAKE_INSTALL_PREFIX=${_thrift_install}"
99101
"-DCMAKE_BUILD_TYPE=Release"
100102
"-DBUILD_JAVA=OFF"

iotdb-client/client-cpp/src/session/Session.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "Session.h"
2121
#include <algorithm>
22+
#include <cstring>
2223
#include <memory>
2324
#include <stack>
2425
#include <time.h>

0 commit comments

Comments
 (0)