From bb5ebc09effefe78228d9320bf797ca535092856 Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 9 Jul 2022 22:27:41 +0300 Subject: [PATCH] Disable git commit hash calculation, because the current approach must be completely replaced. --- CMakeLists.txt | 5 ----- tdutils/CMakeLists.txt | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a833689a..77f32011d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,11 +152,6 @@ if (CLANG OR GCC) endif() endif() -if (NOT DEFINED TD_GIT_COMMIT) - include(GetGitInfo) - get_git_info() -endif() - add_subdirectory(tdtl) add_subdirectory(tdutils) diff --git a/tdutils/CMakeLists.txt b/tdutils/CMakeLists.txt index 2aed70b52..5b96fd555 100644 --- a/tdutils/CMakeLists.txt +++ b/tdutils/CMakeLists.txt @@ -343,6 +343,9 @@ set(TDUTILS_TEST_SOURCE add_library(tdutils STATIC ${TDUTILS_SOURCE}) if (DEFINED TD_GIT_COMMIT) + # this forces the whole tdutils to be recompiled after each commit with Makefile generator as explained at + # https://cmake.org/pipermail/cmake-developers/2012-October/005411.html, + # so this can't be improved for production-ready state set_property(SOURCE td/utils/GitInfo.cpp APPEND PROPERTY COMPILE_DEFINITIONS "GIT_COMMIT=\"${TD_GIT_COMMIT}\"") endif() if (DEFINED TD_GIT_DIRTY)