Support passing defines from top level config makefile

This commit is contained in:
David Sidrane 2016-09-22 11:06:05 -10:00 committed by Lorenz Meier
parent 24e20b2cec
commit 979381fcfa
1 changed files with 5 additions and 0 deletions

View File

@ -809,9 +809,14 @@ function(px4_add_common_flags)
string(TOUPPER ${BOARD} board_upper)
string(REPLACE "-" "_" board_config ${board_upper})
set (added_target_definitions)
if (NOT ${target_definitions})
px4_prepend_string(OUT added_target_definitions STR "-D" LIST ${target_definitions})
endif()
set(added_definitions
-DCONFIG_ARCH_BOARD_${board_config}
-D__STDC_FORMAT_MACROS
${added_target_definitions}
)
if (NOT (APPLE AND (${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")))