Add option to disable pygccxml support

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2008-08-31 15:04:11 +01:00
1 parent 4e41b8c02e
commit 9f87c19f90
1 file changed
+14 -8
+14 -8
View File
@@ -143,6 +143,11 @@ def set_options(opt):
action="store_true", default=False,
dest='examples')
optgrp.add_option('--disable-pygccxml',
help=('Disable pygccxml for unit tests / examples.'),
action="store_true", default=False,
dest='disable_pygccxml')
def configure(conf):
## Write a pybindgen/version.py file containing the project version
generate_version_py()
@@ -158,16 +163,17 @@ def configure(conf):
conf.check_python_version((2,3))
conf.check_python_headers()
gccxml = conf.find_program('gccxml')
if not gccxml:
conf.env['ENABLE_PYGCCXML'] = False
else:
try:
conf.check_python_module('pygccxml')
except Configure.ConfigurationError:
if not Params.g_options.disable_pygccxml:
gccxml = conf.find_program('gccxml')
if not gccxml:
conf.env['ENABLE_PYGCCXML'] = False
else:
conf.env['ENABLE_PYGCCXML'] = True
try:
conf.check_python_module('pygccxml')
except Configure.ConfigurationError:
conf.env['ENABLE_PYGCCXML'] = False
else:
conf.env['ENABLE_PYGCCXML'] = True
def build(bld):