Skip to content

Commit 7a10da0

Browse files
lrgirdwolgirdwood
authored andcommitted
cmake: set git hash to 8 digit
GIT_LOG_HASH can be more than 8 digits. Limit hash value up to first 8 digits. fixes: #3322 Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
1 parent 2e07bb9 commit 7a10da0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/cmake/version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
8383
string(SUBSTRING ${SOF_SRC_HASH_LONG} 0 8 SOF_SRC_HASH)
8484
message(STATUS "Source content hash: ${SOF_SRC_HASH}")
8585
else()
86-
set(SOF_SRC_HASH ${GIT_LOG_HASH})
86+
string(SUBSTRING ${GIT_LOG_HASH} 0 8 SOF_SRC_HASH)
8787
message(WARNING "Source content hash can't be calculated, use GIT_LOG_HASH")
8888
endif()
8989

0 commit comments

Comments
 (0)