forked from Archive/PX4-Autopilot
ver: print PX4_BOARD_LABEL for 'ver all'
This commit is contained in:
parent
dbacdedad1
commit
fdf8461452
|
@ -79,6 +79,7 @@ add_library(version version.c)
|
|||
target_compile_definitions(version
|
||||
PUBLIC
|
||||
PX4_BOARD_NAME="${PX4_BOARD_NAME}"
|
||||
PX4_BOARD_LABEL="${PX4_BOARD_LABEL}"
|
||||
PRIVATE
|
||||
BUILD_URI=${BUILD_URI}
|
||||
)
|
||||
|
|
|
@ -56,6 +56,14 @@ static inline const char *px4_board_name(void)
|
|||
return PX4_BOARD_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the board build target variant
|
||||
*/
|
||||
static inline const char *px4_board_target_label(void)
|
||||
{
|
||||
return PX4_BOARD_LABEL;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the board sub type
|
||||
*/
|
||||
|
|
|
@ -217,6 +217,9 @@ int ver_main(int argc, char *argv[])
|
|||
|
||||
}
|
||||
|
||||
if (show_all) {
|
||||
printf("Build variant: %s\n", px4_board_target_label());
|
||||
}
|
||||
|
||||
if (show_all || !strncmp(argv[1], sz_ver_gcc_str, sizeof(sz_ver_gcc_str))) {
|
||||
printf("Toolchain: %s, %s\n", px4_toolchain_name(), px4_toolchain_version());
|
||||
|
|
Loading…
Reference in New Issue