cmake: version: consider unannotated tags

Command git describe looks only for annotated tags, but we should
get any tag reachable from master, that's why --tags flag is needed.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
Janusz Jankowski 2020-01-07 14:25:00 +01:00 committed by Liam Girdwood
parent 79bbca113d
commit c1f4c3f197
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ if(EXISTS ${TARBALL_VERSION_SOURCE_PATH})
message(STATUS "Found ${TARBALL_VERSION_FILE_NAME}") message(STATUS "Found ${TARBALL_VERSION_FILE_NAME}")
message(STATUS "Version: ${GIT_TAG} / ${GIT_LOG_HASH}") message(STATUS "Version: ${GIT_TAG} / ${GIT_LOG_HASH}")
else() else()
execute_process(COMMAND git describe --abbrev=4 execute_process(COMMAND git describe --tags --abbrev=4
OUTPUT_VARIABLE GIT_TAG OUTPUT_VARIABLE GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET ERROR_QUIET