diff options
author | David Robillard <d@drobilla.net> | 2019-08-07 00:41:25 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-09-07 09:51:48 +0200 |
commit | 8b8ada4682ac5967b2fde4b7989c4b61c49c80e4 (patch) | |
tree | b619194d02fe68fe7c44340aa2a61ba7c91b46b1 /wscript | |
parent | 5fac75bd9aadeb3216a591fe694806e9f4e116b7 (diff) |
Add OpenGL 3 test program
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -55,7 +55,7 @@ def configure(conf): for f in ('CFLAGS', 'CXXFLAGS'): conf.env.append_value(f, ['-fvisibility=hidden']) if Options.options.strict: - conf.env.append_value(f, ['-Wunused-parameter']) + conf.env.append_value(f, ['-Wunused-parameter', '-Wno-pedantic']) autowaf.set_c_lang(conf, 'c99') @@ -65,6 +65,7 @@ def configure(conf): conf.define('PUGL_HAVE_GL', 1) conf.check(features='c cshlib', lib='m', uselib_store='M', mandatory=False) + conf.check(features='c cshlib', lib='dl', uselib_store='DL', mandatory=False) if not Options.options.no_cairo: autowaf.check_pkg(conf, 'cairo', @@ -232,7 +233,7 @@ def build(bld): uselib=['CAIRO'], source=['pugl/detail/x11_cairo.c']) - def build_test(prog, platform, backend, **kwargs): + def build_test(prog, source, platform, backend, **kwargs): use = ['pugl_%s_static' % platform, 'pugl_%s_%s_static' % (platform, backend)] @@ -253,7 +254,7 @@ def build(bld): deps.get(backend_lib, {}).get(k, []))}) bld(features = 'c cprogram', - source = 'test/%s.c' % prog, + source = source, target = target, use = use, install_path = '', @@ -261,10 +262,15 @@ def build(bld): if bld.env.BUILD_TESTS: if bld.is_defined('HAVE_GL'): - build_test('pugl_test', platform, 'gl', uselib=['M']) + build_test('pugl_test', ['test/pugl_test.c'], + platform, 'gl', uselib=['M']) + build_test('pugl_gl3_test', + ['test/pugl_gl3_test.c', 'test/glad/glad.c'], + platform, 'gl', uselib=['M', 'DL']) if bld.is_defined('HAVE_CAIRO'): - build_test('pugl_cairo_test', platform, 'cairo', + build_test('pugl_cairo_test', ['test/pugl_cairo_test.c'], + platform, 'cairo', uselib=['M', 'CAIRO']) if bld.env.DOCS: |