From d6d634c84bc91e3ecea0952cd45bd147a09c44b8 Mon Sep 17 00:00:00 2001 From: Vu Hong Quang Date: Mon, 17 Jun 2019 16:54:43 +0700 Subject: [PATCH] [CMAKE] Make tagged-commit compatible with 9-char, commit-based versioning --- cmake/GenVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/GenVersion.cmake b/cmake/GenVersion.cmake index b2ccfbc344..968fb174ba 100644 --- a/cmake/GenVersion.cmake +++ b/cmake/GenVersion.cmake @@ -42,7 +42,7 @@ else() message(STATUS "You are currently on commit ${COMMIT}") # Get all the tags - execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev=9 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT TAGGEDCOMMIT) message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")