From 2368fff243117c503cc16187178824895fe518cf Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 12 Jul 2018 17:17:20 +0200 Subject: [PATCH] Fix mistake --- cmake/Version.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/Version.cmake b/cmake/Version.cmake index c426fc15f..caa902148 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -49,6 +49,10 @@ if(INCLUDE_GIT_REVISION AND EXISTS "${CMAKE_SOURCE_DIR}/.git") ERROR_QUIET ) + if(NOT ${GIT_CMD_RESULT_REVISION} EQUAL 0) + message(FATAL_ERROR "GIT command failed to get revision string '${GIT_REVISION}'") + endif() + endif() if(FORCE_GIT_REVISION) @@ -57,10 +61,6 @@ endif() if(GIT_REVISION) - if(NOT ${GIT_CMD_RESULT_REVISION} EQUAL 0) - message(FATAL_ERROR "GIT command failed to get revision string '${GIT_REVISION}'") - endif() - string(REGEX REPLACE "^(.+)-([0-9]+)-(g[a-f0-9]+)$" "\\1;\\2;\\3" GIT_PARTS ${GIT_REVISION}) if(NOT GIT_PARTS)