Merge commit 'cc67e4840f1fd579b58b7532722f4cdd96dec94e' as 'libs/CommService'
This commit is contained in:
17
libs/CommService/cmake/Modules/ProcessGIT.cmake
Normal file
17
libs/CommService/cmake/Modules/ProcessGIT.cmake
Normal file
@@ -0,0 +1,17 @@
|
||||
if (GIT_FOUND)
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get the latest abbreviated commit hash of the working branch
|
||||
execute_process(
|
||||
COMMAND git log -1 --format=%h
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
endif()
|
||||
Reference in New Issue
Block a user