Browse Source

Tools: check for feenableexcept on WAF

mission-4.1.18
Pierre Kancir 6 years ago committed by Andrew Tridgell
parent
commit
bb13a75e30
  1. 1
      Tools/ardupilotwaf/boards.py
  2. 16
      Tools/ardupilotwaf/cxx_checks.py

1
Tools/ardupilotwaf/boards.py

@ -362,6 +362,7 @@ class sitl(Board): @@ -362,6 +362,7 @@ class sitl(Board):
]
cfg.check_librt(env)
cfg.check_feenableexcept()
env.LINKFLAGS += ['-pthread',]
env.AP_LIBRARIES += [

16
Tools/ardupilotwaf/cxx_checks.py

@ -169,6 +169,22 @@ def check_librt(cfg, env): @@ -169,6 +169,22 @@ def check_librt(cfg, env):
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
def check_package(cfg, env, libname):
'''use pkg-config to look for an installed library that has a LIBNAME.pc file'''

Loading…
Cancel
Save