<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><pre><br>At 2016-05-31 21:17:26,"Ricardo Constantino" <<a href="mailto:wiiaboo@gmail.com">wiiaboo@gmail.com</a>> wrote:
># HG changeset patch
># User Ricardo Constantino <<a href="mailto:wiiaboo@gmail.com">wiiaboo@gmail.com</a>>
># Date 1464700015 -3600
># Tue May 31 14:06:55 2016 +0100
># Node ID b32b40d45adc80af6dd7b4024b59fc34cd64866e
># Parent 227fc2663961b470a250ca1cdcebf79a411e6d9d
>Make git X265_VERSION output the same as mercurial
>(except X265_REVISION_ID)
>
>diff -r 227fc2663961 -r b32b40d45adc source/cmake/version.cmake
>--- a/source/cmake/version.cmake Tue May 31 14:06:50 2016 +0100
>+++ b/source/cmake/version.cmake Tue May 31 14:06:55 2016 +0100
>@@ -54,20 +54,15 @@
> COMMAND
> ${HG_EXECUTABLE} log -r. --template "{node}"
> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
>- OUTPUT_VARIABLE HG_REVISION_ID
>+ OUTPUT_VARIABLE X265_REVISION_ID
> ERROR_QUIET
> OUTPUT_STRIP_TRAILING_WHITESPACE
> )
>- string(SUBSTRING "${HG_REVISION_ID}" 0 16 HG_REVISION_ID)
>+ string(SUBSTRING "${X265_REVISION_ID}" 0 16 X265_REVISION_ID)
>
> if(X265_LATEST_TAG MATCHES "^r")
> string(SUBSTRING ${X265_LATEST_TAG} 1 -1 X265_LATEST_TAG)
> endif()
>- if(X265_TAG_DISTANCE STREQUAL "0")
>- set(X265_VERSION "${X265_LATEST_TAG}")
>- else()
>- set(X265_VERSION "${X265_LATEST_TAG}+${X265_TAG_DISTANCE}-${HG_REVISION_ID}")
>- endif()
> elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
> execute_process(
> COMMAND
>@@ -77,15 +72,27 @@
> ERROR_QUIET
> OUTPUT_STRIP_TRAILING_WHITESPACE
> )
>-
> execute_process(
> COMMAND
>- ${GIT_EXECUTABLE} describe --tags --first-parent
>+ ${GIT_EXECUTABLE} rev-list ${X265_LATEST_TAG}.. --count --first-parent</pre><pre>My Git 1.7.9 can't support "--first-parent", so the X265_LATEST_TAG will be empty, it made the cmake build failed.</pre><pre><br></pre><pre>
</pre></div></div>