diff options
author | David Robillard <d@drobilla.net> | 2018-09-16 17:09:10 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-16 17:09:26 +0200 |
commit | d63edc742cebd685f8a05936682210aa5c1e69a9 (patch) | |
tree | fdbb845a9477e82a6c9772514a11563b45602878 /waflib/extras | |
parent | b8205253aa82aa05097118ffcdcc4bebaf48e128 (diff) | |
download | ingen-d63edc742cebd685f8a05936682210aa5c1e69a9.tar.gz ingen-d63edc742cebd685f8a05936682210aa5c1e69a9.tar.bz2 ingen-d63edc742cebd685f8a05936682210aa5c1e69a9.zip |
Squashed 'waflib/' changes from 982416b8..6e726eb1
6e726eb1 Add support for suppressing warnings from system libraries
3e43d096 Add short forms for common options
5db477ce Automatically define version for child libraries
git-subtree-dir: waflib
git-subtree-split: 6e726eb11d3e21be410549d27dd1aa94678f3d09
Diffstat (limited to 'waflib/extras')
-rw-r--r-- | waflib/extras/autowaf.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/waflib/extras/autowaf.py b/waflib/extras/autowaf.py index a4a06ba8..8f9c6338 100644 --- a/waflib/extras/autowaf.py +++ b/waflib/extras/autowaf.py @@ -60,13 +60,13 @@ def set_options(opt, debug_by_default=False, test=False): opts.add_option('--optimize', action='store_false', default=True, dest='debug', help="build optimized binaries") else: - opts.add_option('--debug', action='store_true', default=False, + opts.add_option('-d', '--debug', action='store_true', default=False, dest='debug', help="build debuggable binaries") opts.add_option('--pardebug', action='store_true', default=False, dest='pardebug', help="build debug libraries with D suffix") - opts.add_option('--strict', action='store_true', default=False, + opts.add_option('-s', '--strict', action='store_true', default=False, dest='strict', help="use strict compiler flags and show all warnings") opts.add_option('--ultra-strict', action='store_true', default=False, @@ -78,12 +78,12 @@ def set_options(opt, debug_by_default=False, test=False): # Test options if test: test_opts = opt.add_option_group('Test options', '') - opts.add_option('--test', action='store_true', dest='build_tests', + opts.add_option('-T', '--test', action='store_true', dest='build_tests', help='build unit tests') opts.add_option('--no-coverage', action='store_true', dest='no_coverage', help='do not instrument code for test coverage') - test_opts.add_option('--test-wrapper', type='string', + test_opts.add_option('--wrapper', type='string', dest='test_wrapper', help='command prefix for tests (e.g. valgrind)') test_opts.add_option('--verbose-tests', action='store_true', @@ -180,6 +180,16 @@ def check_pkg(conf, name, **args): else: conf.env[var_name] = CheckType.OPTIONAL + if not conf.env.MSVC_COMPILER and 'system' in args and args['system']: + includes = conf.env['INCLUDES_' + nameify(args['uselib_store'])] + for path in includes: + if 'COMPILER_CC' in conf.env: + conf.env.append_value('CFLAGS', ['-isystem', path]) + if 'COMPILER_CXX' in conf.env: + conf.env.append_value('CXXFLAGS', ['-isystem', path]) + + conf.env.append_value('CXXFLAGS', ['-isystem', '/usr/local/include']) + def normpath(path): if sys.platform == 'win32': return os.path.normpath(path).replace('\\', '/') @@ -441,6 +451,8 @@ def set_lib_env(conf, name, version): conf.env['LIBPATH_' + NAME] = [conf.env.LIBDIR] conf.env['LIB_' + NAME] = [lib_name] + conf.define(NAME + '_VERSION', version) + def set_line_just(conf, width): global line_just line_just = max(line_just, width) |