Skip to content

Commit ffcc5c5

Browse files
committed
use 'git tag' instead of 'git describe' to find the latest tag
1 parent 5fdd236 commit ffcc5c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMake/git.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
function(get_git_tag output_var)
2+
#COMMAND git describe --abbrev=0 --tags
23
execute_process(
3-
COMMAND git describe --abbrev=0 --tags
4+
COMMAND git tag --sort -creatordate
5+
COMMAND head -n 1
46
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
57
RESULT_VARIABLE _EXIT_CODE
68
OUTPUT_VARIABLE GIT_TAG

0 commit comments

Comments
 (0)