From 21793b8d297e9f5941680d5aa5b7feed4891efbe Mon Sep 17 00:00:00 2001 From: Vasily Nemkov Date: Wed, 6 Dec 2023 12:35:49 +0100 Subject: [PATCH] Fixed version-related hiccups Removed CLICKHOUSE_CPP_VERSION_STRING Better way of reading version.h in version.cmake --- clickhouse/version.h | 2 -- cmake/version.cmake | 3 +-- ut/client_ut.cpp | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/clickhouse/version.h b/clickhouse/version.h index 96a8835e..662de7f9 100644 --- a/clickhouse/version.h +++ b/clickhouse/version.h @@ -12,5 +12,3 @@ + CLICKHOUSE_CPP_VERSION_MINOR * 100 * 100 \ + CLICKHOUSE_CPP_VERSION_PATCH * 100 \ + CLICKHOUSE_CPP_VERSION_BUILD - -#define CLICKHOUSE_CPP_VERSION_STRING #CLICKHOUSE_CPP_VERSION_MAJOR "." #CLICKHOUSE_CPP_VERSION_MINOR "." #CLICKHOUSE_CPP_VERSION_PATCH diff --git a/cmake/version.cmake b/cmake/version.cmake index ce3ad233..b7aee35d 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -18,12 +18,11 @@ function (regex_extract_matching_groups INPUT REGEX_STR) endforeach () endfunction () -regex_extract_matching_groups("ttest" "FAILED TO SERCH" RESULT) function(clickhouse_cpp_get_version) # Extract all components of the version from the clickhouse/version.h - file(READ ${CMAKE_SOURCE_DIR}/clickhouse/version.h VERSION_FILE_DATA) + file(READ ${CMAKE_CURRENT_SOURCE_DIR}/clickhouse/version.h VERSION_FILE_DATA) foreach (VERSION_COMPONENT IN ITEMS diff --git a/ut/client_ut.cpp b/ut/client_ut.cpp index 9df58c07..7c81c519 100644 --- a/ut/client_ut.cpp +++ b/ut/client_ut.cpp @@ -107,8 +107,6 @@ TEST_P(ClientCase, Version) { EXPECT_EQ(CLICKHOUSE_CPP_VERSION_PATCH, version.patch); EXPECT_EQ(CLICKHOUSE_CPP_VERSION_BUILD, version.build); EXPECT_EQ(CLICKHOUSE_CPP_VERSION_PATCH, version.patch); - - // EXPECT_EQ(CLICKHOUSE_CPP_VERSION, versionNumber(version.major, version.minor, version.patch, version.build)); } TEST_P(ClientCase, Array) {