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:
Daniel Agar
2015-04-18 00:57:26 -04:00
parent b53a33bc51
commit 207b57869d
8 changed files with 9 additions and 18 deletions

View File

@@ -210,9 +210,9 @@ void UavcanNode::fill_node_info()
/* software version */
uavcan::protocol::SoftwareVersion swver;
// Extracting the first 8 hex digits of FW_GIT and converting them to int
// Extracting the first 8 hex digits of GIT_VERSION and converting them to int
char fw_git_short[9] = {};
std::memmove(fw_git_short, FW_GIT, 8);
std::memmove(fw_git_short, GIT_VERSION, 8);
assert(fw_git_short[8] == '\0');
char *end = nullptr;
swver.vcs_commit = std::strtol(fw_git_short, &end, 16);