Update approach to obtain the head git hash

This commit is contained in:
Lorenz Meier
2015-10-30 16:25:08 +01:00
parent f042c077b2
commit c912be70d1
3 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -700,7 +700,7 @@ function(px4_create_git_hash_header)
REQUIRED HEADER
ARGN ${ARGN})
execute_process(
COMMAND git log -n 1 --pretty=format:"%H"
COMMAND git rev-parse HEAD
OUTPUT_VARIABLE git_desc
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+1 -1
View File
@@ -1,4 +1,4 @@
/* Auto Magically Generated file */
/* Do not edit! */
#define PX4_GIT_VERSION_STR @git_desc@
#define PX4_GIT_VERSION_STR "@git_desc@"
#define PX4_GIT_VERSION_BINARY 0x@git_desc_short@