From 3f06528ba3c5423b45d615086bdcc254455989ee Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 2 Oct 2023 17:04:15 +0200 Subject: [PATCH] Fix version without git tags --- cmake/Version.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 645cd3055..df08b6909 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -25,7 +25,7 @@ if(INCLUDE_GIT_REVISION AND EXISTS "${CMAKE_SOURCE_DIR}/.git") find_program(GIT_EXECUTABLE git) if(NOT GIT_EXECUTABLE OR GIT_EXECUTABLE-NOTFOUND) - message(FATAL_ERROR "Missing GIT executable." ) + message(FATAL_ERROR "Missing Git executable." ) endif() # Get the current working branch @@ -48,7 +48,7 @@ if(INCLUDE_GIT_REVISION AND EXISTS "${CMAKE_SOURCE_DIR}/.git") ) if(NOT ${GIT_CMD_RESULT_REVISION} EQUAL 0) - message(FATAL_ERROR "GIT command failed to get revision string '${GIT_REVISION}'") + message(FATAL_ERROR "Git command failed to get revision string '${GIT_REVISION}'") endif() endif() @@ -67,7 +67,7 @@ if(GIT_REVISION) list(LENGTH GIT_PARTS GIT_PARTS_LENGTH) if(NOT GIT_PARTS_LENGTH EQUAL 3) - message(FATAL_ERROR "Failed to parse git revision string '${GIT_REVISION}'") + set(GIT_PARTS "${majorminorpatch};0;${GIT_REVISION}") endif() list(GET GIT_PARTS 0 GIT_TAGNAME)