diff options
author | David Robillard <d@drobilla.net> | 2020-07-05 15:01:16 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-05 18:47:39 +0200 |
commit | abf44b129480937cd31d6585183d266a496ee2a4 (patch) | |
tree | 35386142d7b7564a997cac8b39071a439bc997a3 /wscript | |
parent | 80838668aea1b53cc4438a63bb9f0fcab80cd3f7 (diff) | |
download | pugl-abf44b129480937cd31d6585183d266a496ee2a4.tar.gz pugl-abf44b129480937cd31d6585183d266a496ee2a4.tar.bz2 pugl-abf44b129480937cd31d6585183d266a496ee2a4.zip |
Ensure that all API headers are warning-free
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -443,6 +443,37 @@ def build(bld): 'pugl_%s_stub_static' % platform], uselib = deps[platform]['uselib'] + ['CAIRO']) + # Make a hyper strict warning environment for checking API headers + strict_env = bld.env.derive() + autowaf.remove_all_warning_flags(strict_env) + autowaf.enable_all_warnings(strict_env) + autowaf.set_warnings_as_errors(strict_env) + autowaf.add_compiler_flags(strict_env, '*', { + 'clang': ['-Wno-padded'], + 'gcc': ['-Wno-padded'], + }) + autowaf.add_compiler_flags(strict_env, 'cxx', { + 'clang': ['-Wno-documentation-unknown-command'], + }) + + # Check that C headers build with (almost) no warnings + bld(features = 'c cprogram', + source = 'test/test_build.c', + target = 'test/test_build_c', + install_path = '', + env = strict_env, + use = ['pugl_%s_static' % platform], + uselib = deps[platform]['uselib'] + ['CAIRO']) + + # Check that C++ headers build with (almost) no warnings + bld(features = 'cxx cxxprogram', + source = 'test/test_build.cpp', + target = 'test/test_build_cpp', + install_path = '', + env = strict_env, + use = ['pugl_%s_static' % platform], + uselib = deps[platform]['uselib'] + ['CAIRO']) + if bld.env.CXX and bld.env.HAVE_GL: build_example('pugl_cxx_demo', ['examples/pugl_cxx_demo.cpp'], platform, 'gl', |