diff options
author | mattip <matti.picus@gmail.com> | 2018-05-28 22:03:32 -0700 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2018-05-28 22:03:32 -0700 |
commit | 8439c1cbdc9538b90d6565d44c3ea05579c6096a (patch) | |
tree | 2361d9dd911d44d1b054a0af81a269fd69b6a5b6 | |
parent | 9903d62613ce99543b14b7423a52da0c309e3a11 (diff) | |
download | numpy-8439c1cbdc9538b90d6565d44c3ea05579c6096a.tar.gz |
fix from review and comments
-rwxr-xr-x | runtests.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/runtests.py b/runtests.py index cb67e9881..9c5b2521c 100755 --- a/runtests.py +++ b/runtests.py @@ -328,12 +328,18 @@ def build_project(args): # Always use ccache, if installed env['PATH'] = os.pathsep.join(EXTRA_PATH + env.get('PATH', '').split(os.pathsep)) cvars = distutils.sysconfig.get_config_vars() - if 'gcc' in cvars['CC']: - # add flags used as werrors tools/travis-test.sh - warnings_as_errors = ('-Werror=declaration-after-statement -Werror=vla' - ' -Werror=nonnull -Werror=pointer-arith' - ' -Wlogical-op -Werror=unused-function ') - env['CFLAGS'] = warnings_as_errors + env.get('CFLAGS', '') + if 'gcc' in cvars.get('CC', ''): + # add flags used as werrors from tools/travis-test.sh, + # add unused-function as well from sysconfig + warnings_as_errors = ' '.join([ + '-Werror=declaration-after-statement', + '-Werror=vla', + '-Werror=nonnull', + '-Werror=pointer-arith', + '-Wlogical-op', + '-Werror=unused-function', + ]) + env['CFLAGS'] = warnings_as_errors + ' ' + env.get('CFLAGS', '') if args.debug or args.gcov: # assume everyone uses gcc/gfortran env['OPT'] = '-O0 -ggdb' |