mirror of https://github.com/ArduPilot/ardupilot
Tools: check for feenableexcept on WAF
This commit is contained in:
parent
17c0cf8d5c
commit
bb13a75e30
|
@ -362,6 +362,7 @@ class sitl(Board):
|
||||||
]
|
]
|
||||||
|
|
||||||
cfg.check_librt(env)
|
cfg.check_librt(env)
|
||||||
|
cfg.check_feenableexcept()
|
||||||
|
|
||||||
env.LINKFLAGS += ['-pthread',]
|
env.LINKFLAGS += ['-pthread',]
|
||||||
env.AP_LIBRARIES += [
|
env.AP_LIBRARIES += [
|
||||||
|
|
|
@ -169,6 +169,22 @@ def check_librt(cfg, env):
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
@conf
|
||||||
|
def check_feenableexcept(cfg):
|
||||||
|
|
||||||
|
cfg.check(
|
||||||
|
compiler='cxx',
|
||||||
|
fragment='''
|
||||||
|
#include <fenv.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
return feenableexcept(FE_OVERFLOW | FE_DIVBYZERO);
|
||||||
|
}''',
|
||||||
|
msg="Checking for feenableexcept",
|
||||||
|
define_name="HAVE_FEENABLEEXCEPT",
|
||||||
|
mandatory=False,
|
||||||
|
)
|
||||||
|
|
||||||
@conf
|
@conf
|
||||||
def check_package(cfg, env, libname):
|
def check_package(cfg, env, libname):
|
||||||
'''use pkg-config to look for an installed library that has a LIBNAME.pc file'''
|
'''use pkg-config to look for an installed library that has a LIBNAME.pc file'''
|
||||||
|
|
Loading…
Reference in New Issue