Pārlūkot izejas kodu

* Fixed bug: Git tag is always read from the root repository. Now it will be read from the current cmake source directory.

master
bergmann pirms 6 gadiem
vecāks
revīzija
6f0f8afea0
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. +3
    -3
      git_helper.cmake

+ 3
- 3
git_helper.cmake Parādīt failu

@@ -28,17 +28,17 @@ Function ( GitGetVersion GIT_ROOT OUT_MAJOR OUT_MINOR OUT_PATCH OUT_BUILD OUT_HA
EndIf ( )

# Find the latest git tag
GitExecute ( "git describe --tags --abbrev=1 --match v[0-9].[0-9]* HEAD" False TAG SUCCESS )
GitExecute ( "git -C ${CMAKE_CURRENT_SOURCE_DIR} describe --tags --abbrev=1 --match v[0-9].[0-9]* HEAD" False TAG SUCCESS )
If ( NOT ${SUCCESS} )
Return ( )
EndIf ( )

GitExecute ( "git status -s -uall" True DIRTY SUCCESS )
GitExecute ( "git -C ${CMAKE_CURRENT_SOURCE_DIR} status -s -uall" True DIRTY SUCCESS )
If ( NOT ${SUCCESS} )
Return ( )
EndIf ( )

GitExecute ( "git rev-parse HEAD" True HASH SUCCESS )
GitExecute ( "git -C ${CMAKE_CURRENT_SOURCE_DIR} rev-parse HEAD" True HASH SUCCESS )
If ( NOT ${SUCCESS} )
Return ( )
EndIf ( )


Notiek ielāde…
Atcelt
Saglabāt