3 from waflib.Configure
import conf
6 opt = opt.add_option_group(
'Eigen Options')
7 opt.add_option(
'--with-eigen', type=
'string',
8 help=
"give Eigen3 installation location")
13 instdir = ctx.options.with_eigen
15 if instdir
is None or instdir.lower()
in [
'yes',
'true',
'on']:
16 ctx.start_msg(
'Checking for Eigen in PKG_CONFIG_PATH')
19 ctx.check_cfg(package=
'eigen3', uselib_store=
'EIGEN', args=
'--cflags --libs', mandatory=mandatory)
20 elif instdir.lower()
in [
'no',
'off',
'false']:
23 ctx.start_msg(
'Checking for Eigen in %s' % instdir)
24 ctx.env.INCLUDES_EIGEN = [ osp.join(instdir,
'include/eigen3') ]
26 ctx.check(header_name=
"Eigen/Dense", use=
'EIGEN', mandatory=mandatory)
27 if len(ctx.env.INCLUDES_EIGEN):
28 ctx.end_msg(ctx.env.INCLUDES_EIGEN[0])
30 ctx.end_msg(
'Eigen3 not found')
def check_eigen(ctx, mandatory=True)