From 109558cf1f9ed94501633b8049787e10f487d5a2 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 23 Nov 2016 11:32:00 +0100 Subject: [PATCH] cmake: fix git binary hash The generated binary hash was off by one. --- cmake/common/px4_base.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/common/px4_base.cmake b/cmake/common/px4_base.cmake index b471983ab9..bfb6a93043 100644 --- a/cmake/common/px4_base.cmake +++ b/cmake/common/px4_base.cmake @@ -901,7 +901,8 @@ function(px4_create_git_hash_header) ) #message(STATUS "GIT_VERSION = ${git_version}") set(git_version_short) - string(SUBSTRING ${git_version} 1 16 git_version_short) + # We use the first 16 chars, starting at index 0 + string(SUBSTRING ${git_version} 0 16 git_version_short) configure_file(${PX4_SOURCE_DIR}/cmake/templates/build_git_version.h.in ${HEADER} @ONLY) endfunction()