From 460ef63f5dac8b6134f9c3500fa8a99d58b7b36c Mon Sep 17 00:00:00 2001 From: vnctdj <3978690+vnctdj@users.noreply.github.com> Date: Thu, 2 Jul 2020 23:07:31 +0200 Subject: [PATCH] Fix reliability of the CMake generated version steps to reproduce : git checkout v1.10.1~3 git describe --always --> v1.10-19-g9aab3d986 [build now] PPSSPPSDL --version --> v1.10-19-g9aab3d986 git checkout v1.10.1 git describe --always --> v1.10.1 [build now] PPSSPPSDL --version --> v1.10-19-g9aab3d986 Indeed, the "v1.10.1" regex matches the "v1.10-19-g9aab3d986" string. How unfortunate! So I just deleted that check, building the same commit twice should not happen that often :) --- git-version.cmake | 7 ------- 1 file changed, 7 deletions(-) diff --git a/git-version.cmake b/git-version.cmake index 97a9de9710..efd4983b8c 100644 --- a/git-version.cmake +++ b/git-version.cmake @@ -23,13 +23,6 @@ if(EXISTS ${GIT_VERSION_FILE}) if(NOT ${match} EQUAL "") set(GIT_VERSION_UPDATE "0") endif() - - # Don't update if it's already the same. - file(STRINGS ${GIT_VERSION_FILE} match - REGEX "${GIT_VERSION}") - if(NOT ${match} EQUAL "") - set(GIT_VERSION_UPDATE "0") - endif() endif() set(code_string "// This is a generated file.\n\n"