mirror of https://github.com/ArduPilot/ardupilot
waf: only apply gsoap specific flags to gsoap sources
This commit is contained in:
parent
51b86b5acc
commit
51a6d3c16a
|
@ -248,6 +248,25 @@ def double_precision_check(tasks):
|
|||
t.env.CXXFLAGS.append("-DALLOW_DOUBLE_MATH_FUNCTIONS")
|
||||
|
||||
|
||||
def gsoap_library_check(bld, tasks):
|
||||
'''check for tasks marked as gSOAP library source'''
|
||||
|
||||
for t in tasks:
|
||||
if len(t.inputs) == 1:
|
||||
gsoap_tasks = []
|
||||
for s in t.env.AP_LIB_EXTRA_SOURCES["AP_ONVIF"]:
|
||||
gsoap_tasks.append(bld.bldnode.find_or_declare(os.path.join('libraries', "AP_ONVIF", s)))
|
||||
|
||||
if t.inputs[0] in gsoap_tasks:
|
||||
t.env.CXXFLAGS += [
|
||||
'-Wno-shadow',
|
||||
]
|
||||
if 'clang++' not in t.env.COMPILER_CXX:
|
||||
t.env.CXXFLAGS += [
|
||||
'-Wno-suggest-override',
|
||||
]
|
||||
|
||||
|
||||
@feature('ap_library_object')
|
||||
@after_method('process_source')
|
||||
def ap_library_register_for_check(self):
|
||||
|
@ -255,6 +274,8 @@ def ap_library_register_for_check(self):
|
|||
return
|
||||
|
||||
double_precision_check(self.compiled_tasks)
|
||||
if self.env.ENABLE_ONVIF:
|
||||
gsoap_library_check(self.bld, self.compiled_tasks)
|
||||
|
||||
if not self.env.ENABLE_HEADER_CHECKS:
|
||||
return
|
||||
|
|
|
@ -81,14 +81,6 @@ class Board:
|
|||
env.AP_LIBRARIES += [
|
||||
'AP_ONVIF'
|
||||
]
|
||||
env.CXXFLAGS += [
|
||||
'-Wno-shadow',
|
||||
'-Wno-undef',
|
||||
]
|
||||
if 'clang++' not in cfg.env.COMPILER_CXX:
|
||||
env.CXXFLAGS += [
|
||||
'-Wno-suggest-override',
|
||||
]
|
||||
else:
|
||||
env.ENABLE_ONVIF = False
|
||||
env.DEFINES.update(
|
||||
|
|
Loading…
Reference in New Issue