From 2c029ae1f9242a831ec67e98a1352b23079a5d11 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Tue, 3 May 2016 22:07:05 -0300 Subject: [PATCH] waf: fix undef warnings in examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix warnings like this: :0:21: warning: "APM_BUILD_DataFlash_test" is not defined [-Wundef] /home/lucas/p/dronecode/ardupilot/libraries/AP_Vehicle/AP_Vehicle_Type.h:36:41: note: in expansion of macro ‘APM_BUILD_DIRECTORY’ #define APM_BUILD_TYPE(type) ((type) == APM_BUILD_DIRECTORY) ^ These happen because we are trying to set APM_BUILD_DIRECTORY to undefined values. We should rather default to the APM_BUILD_DIRECTORY == APM_BUILD_UNKNOWN --- Tools/ardupilotwaf/ardupilotwaf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/ardupilotwaf/ardupilotwaf.py b/Tools/ardupilotwaf/ardupilotwaf.py index d4c9907e1e..c55273b35b 100644 --- a/Tools/ardupilotwaf/ardupilotwaf.py +++ b/Tools/ardupilotwaf/ardupilotwaf.py @@ -136,7 +136,7 @@ def ap_program(bld, @conf def ap_example(bld, **kw): kw['program_groups'] = 'examples' - ap_program(bld, **kw) + ap_program(bld, use_legacy_defines=False, **kw) # NOTE: Code in libraries/ is compiled multiple times. So ensure each # compilation is independent by providing different index for each.