mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 02:53:33 +08:00
only define GIT_VERSION where it's used
-when the git revision is passed to every file as a define it causes unnecessary ccache cache misses
This commit is contained in:
@@ -42,3 +42,5 @@ SRCS = ver.c
|
||||
MODULE_STACKSIZE = 1024
|
||||
|
||||
MAXOPTIMIZATION = -Os
|
||||
|
||||
EXTRADEFINES = -DGIT_VERSION='"$(GIT_DESC)"'
|
||||
|
||||
@@ -101,7 +101,7 @@ int ver_main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (show_all || !strncmp(argv[1], sz_ver_git_str, sizeof(sz_ver_git_str))) {
|
||||
printf("FW git-hash: %s\n", FW_GIT);
|
||||
printf("FW git-hash: %s\n", GIT_VERSION);
|
||||
ret = 0;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user