Skip to content
Snippets Groups Projects
Commit 52eff5a0 authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake,BL] Fixed git_version_sha1_short and git_version_sha1.

parent 98cc67c4
No related branches found
No related tags found
No related merge requests found
......@@ -69,3 +69,18 @@ if(DESCRIBE_RESULT EQUAL 0)
else()
message(WARNING "Git repository contains no tags! Please run: git fetch --tags")
endif()
# Get git commit
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --format=%H
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_SHA1
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_SHA1_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment