Systemlib: Add FW and OS versioning

This commit is contained in:
Lorenz Meier
2016-05-03 11:39:39 +02:00
parent cef1e79b00
commit ff3e17df0d
4 changed files with 58 additions and 0 deletions
+7
View File
@@ -765,6 +765,13 @@ function(px4_create_git_hash_header)
ONE_VALUE HEADER
REQUIRED HEADER
ARGN ${ARGN})
execute_process(
COMMAND git describe --tags
OUTPUT_VARIABLE git_tag
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
message(STATUS "GIT_TAG = ${git_tag}")
execute_process(
COMMAND git rev-parse HEAD
OUTPUT_VARIABLE git_desc
+1
View File
@@ -2,3 +2,4 @@
/* Do not edit! */
#define PX4_GIT_VERSION_STR "@git_desc@"
#define PX4_GIT_VERSION_BINARY 0x@git_desc_short@
#define PX4_GIT_TAG_STR "@git_tag@"