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.")