Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clickhouse-cpp] update to 1.5.0 #18330

Merged
merged 13 commits into from
Sep 17, 2021
42 changes: 0 additions & 42 deletions ports/clickhouse-cpp/00001-fix-build.patch

This file was deleted.

40 changes: 0 additions & 40 deletions ports/clickhouse-cpp/CMakeLists.txt

This file was deleted.

15 changes: 15 additions & 0 deletions ports/clickhouse-cpp/fix-error-C4996.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/clickhouse/CMakeLists.txt b/clickhouse/CMakeLists.txt
index 7e10ffd..cbbffdc 100644
--- a/clickhouse/CMakeLists.txt
+++ b/clickhouse/CMakeLists.txt
@@ -31,6 +31,10 @@ SET ( clickhouse-cpp-lib-src
query.cpp
)

+if (MSVC)
+ add_compile_options(/wd4996)
+endif()
+
ADD_LIBRARY (clickhouse-cpp-lib SHARED ${clickhouse-cpp-lib-src})
SET_TARGET_PROPERTIES(clickhouse-cpp-lib PROPERTIES LINKER_LANGUAGE CXX)
TARGET_LINK_LIBRARIES (clickhouse-cpp-lib
13 changes: 13 additions & 0 deletions ports/clickhouse-cpp/fix-error-c2668.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/clickhouse/columns/decimal.cpp b/clickhouse/columns/decimal.cpp
index 7334bb1..41d43b6 100644
--- a/clickhouse/columns/decimal.cpp
+++ b/clickhouse/columns/decimal.cpp
@@ -27,7 +27,7 @@ inline bool mulOverflow(const Int128 & l, const T & r, Int128 * result)

#else
template <typename T>
-inline bool getSignBit(const T & v)
+inline bool getSignBit(const T & (long double v))
{
return std::signbit(v);
}
JonLiu1993 marked this conversation as resolved.
Show resolved Hide resolved
24 changes: 11 additions & 13 deletions ports/clickhouse-cpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO artpaul/clickhouse-cpp
REF 1634d8b9e2f3183de1574344563d90557be3b305
SHA512 bef74f624c2a777f8ec6b7e87ac3cc564e914bcecc639b3889695da56be4c90531309a8fd87054c2777580c36bc3b2d6e9c5690a6345018bf65a5294eeeb3390
REPO ClickHouse/clickhouse-cpp
REF 1415b5936a2ac2f084850b09057e05fb5798b2f1 #v1.5.0
SHA512 222b31b16744af64f0a874ec956568adcecb553e43f8d4a2d16c00d55b31015d917a4dc7bb30d5430a894459b1be5e05b292e2d0918bf6f5609046a60539f80f
HEAD_REF master
PATCHES 00001-fix-build.patch
PATCHES
fix-error-c2668.patch
fix-error-C4996.patch #fix x64-uwp error:std::uncaught_exception() is deprecated in C++17
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/clickhouse-cpp)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/clickhouse-cpp/copyright COPYONLY)
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
17 changes: 12 additions & 5 deletions ports/clickhouse-cpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
{
"name": "clickhouse-cpp",
"version-string": "2019-05-22",
"port-version": 1,
"description": "C++ client for Yandex ClickHouse.",
"homepage": "https://github.com/artpaul/clickhouse-cpp",
"version": "1.5.0",
"description": "C++ client for Yandex ClickHouse",
"homepage": "https://github.com/ClickHouse/clickhouse-cpp",
"dependencies": [
"cityhash",
"lz4"
"lz4",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1361,8 +1361,8 @@
"port-version": 0
},
"clickhouse-cpp": {
"baseline": "2019-05-22",
"port-version": 1
"baseline": "1.5.0",
"port-version": 0
},
"clipp": {
"baseline": "2019-04-30",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/clickhouse-cpp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "14c4074d1a59fbe8b01ebe934698519c63885b8b",
"version": "1.5.0",
"port-version": 0
},
{
"git-tree": "a748366b06afe85b514215e2d27832304581b811",
"version-string": "2019-05-22",
Expand Down