[x265] [PATCH] cmake: Use alternate method to get latest tag
Ricardo Constantino
wiiaboo at gmail.com
Tue Jun 14 23:03:16 CEST 2016
# HG changeset patch
# User Ricardo Constantino <wiiaboo at gmail.com>
# Date 1465938156 -3600
# Tue Jun 14 22:02:36 2016 +0100
# Node ID 6542b46daff8a06f5cae42a47ca894bbee7b37ac
# Parent 106a5a7dc4b337121c11484bc3bc4900b8a0d9a4
cmake: Use alternate method to get latest tag
--first-parent only works with git describe since git v1.8.4
diff -r 106a5a7dc4b3 -r 6542b46daff8 source/cmake/version.cmake
--- a/source/cmake/version.cmake Thu Jun 09 13:34:55 2016 -0500
+++ b/source/cmake/version.cmake Tue Jun 14 22:02:36 2016 +0100
@@ -66,7 +66,15 @@
elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
execute_process(
COMMAND
- ${GIT_EXECUTABLE} describe --tags --abbrev=0 --first-parent
+ ${GIT_EXECUTABLE} rev-list --tags --max-count=1
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ OUTPUT_VARIABLE X265_LATEST_TAG_COMMIT
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ execute_process(
+ COMMAND
+ ${GIT_EXECUTABLE} describe --tags ${X265_LATEST_TAG_COMMIT}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE X265_LATEST_TAG
ERROR_QUIET
More information about the x265-devel
mailing list