From e3426d466a3cf5714f59b85766fc4bd2ec0b3f46 Mon Sep 17 00:00:00 2001 From: Erik Junghanns Date: Wed, 3 Nov 2021 10:53:11 +0100 Subject: [PATCH] CIPIN-107 - Fixed Yocto Recipies --- cmake/git_helper.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/git_helper.cmake b/cmake/git_helper.cmake index 8809ed3..c731852 100644 --- a/cmake/git_helper.cmake +++ b/cmake/git_helper.cmake @@ -24,21 +24,21 @@ EndFunction ( ) Function ( GitGetVersion GIT_ROOT OUT_MAJOR OUT_MINOR OUT_PATCH OUT_BUILD OUT_HASH OUT_BEHIND OUT_DIRTY ) If ( NOT EXISTS "${GIT_ROOT}/.git" ) - Return ( ) + Message ( FATAL_ERROR "${GIT_ROOT} is not a git directory" ) EndIf ( ) # Find the latest git tag - GitExecute ( "git -C ${CMAKE_CURRENT_SOURCE_DIR} describe --tags --abbrev=1 --match v[0-9].[0-9]* HEAD" False TAG SUCCESS ) + GitExecute ( "git -C ${GIT_ROOT} describe --tags --abbrev=1 --match v[0-9].[0-9]* HEAD" False TAG SUCCESS ) If ( NOT ${SUCCESS} ) Return ( ) EndIf ( ) - GitExecute ( "git -C ${CMAKE_CURRENT_SOURCE_DIR} status -s -uall" True DIRTY SUCCESS ) + GitExecute ( "git -C ${GIT_ROOT} status -s -uall" True DIRTY SUCCESS ) If ( NOT ${SUCCESS} ) Return ( ) EndIf ( ) - GitExecute ( "git -C ${CMAKE_CURRENT_SOURCE_DIR} rev-parse HEAD" True HASH SUCCESS ) + GitExecute ( "git -C ${GIT_ROOT} rev-parse HEAD" True HASH SUCCESS ) If ( NOT ${SUCCESS} ) Return ( ) EndIf ( ) @@ -105,10 +105,10 @@ EndFunction ( ) Function ( GitGetHash GIT_ROOT OUT_HASH ) If ( NOT EXISTS "${GIT_ROOT}/.git" ) - Return ( ) + Message ( FATAL_ERROR "${GIT_ROOT} is not a git directory" ) EndIf ( ) - GitExecute ( "git -C ${CMAKE_CURRENT_SOURCE_DIR} rev-parse HEAD" True HASH SUCCESS ) + GitExecute ( "git -C ${GIT_ROOT} rev-parse HEAD" True HASH SUCCESS ) If ( NOT ${SUCCESS} ) Return ( ) EndIf ( ) @@ -123,10 +123,10 @@ EndFunction ( ) Function ( GitGetIsDirty GIT_ROOT OUT_DIRTY ) If ( NOT EXISTS "${GIT_ROOT}/.git" ) - Return ( ) + Message ( FATAL_ERROR "${GIT_ROOT} is not a git directory" ) EndIf ( ) - GitExecute ( "git -C ${CMAKE_CURRENT_SOURCE_DIR} status -s -uall" True DIRTY SUCCESS ) + GitExecute ( "git -C ${GIT_ROOT} status -s -uall" True DIRTY SUCCESS ) If ( NOT ${SUCCESS} ) Return ( ) EndIf ( )