From 9bae63205c878126a122cac1c3ff05c09bbde6b7 Mon Sep 17 00:00:00 2001 From: huangxin Date: Tue, 28 Jun 2022 17:47:36 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E5=A2=9E=E5=8A=A0git?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fef3d43..5b2b51f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,13 +12,8 @@ if ("${GIT_TAG}" STREQUAL "") STRING(TIMESTAMP COMPILE_TIME %Y-%m-%d_%H:%M:%S) SET(GIT_VERSION ${COMPILE_TIME}) else () - EXECUTE_PROCESS(COMMAND git rev-parse --short HEAD - OUTPUT_VARIABLE GIT_HASH) - STRING(REGEX REPLACE "\n$" "" GIT_TAG ${GIT_TAG}) - STRING(REGEX REPLACE "\n$" "" GIT_HASH ${GIT_HASH}) - - SET(GIT_VERSION ${GIT_TAG}_${GIT_HASH}) + SET(GIT_VERSION ${GIT_TAG}) endif ()