From: Zbigniew Jędrzejewski-Szmek Date: Fri, 12 May 2017 19:20:54 +0000 (-0400) Subject: tests: make sure that our headers are valid c++ X-Git-Tag: v234~196^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d7f149c1aae0e277fabfe3bb6441e333f867444f;p=thirdparty%2Fsystemd.git tests: make sure that our headers are valid c++ This adds a meson test because it fits nicely into the existing framework. It should be enough to run this test once in a while, so I don't think it's crucial to also have it under autotools. --- diff --git a/src/systemd/meson.build b/src/systemd/meson.build index 43fd0130b92..75435acb147 100644 --- a/src/systemd/meson.build +++ b/src/systemd/meson.build @@ -38,16 +38,17 @@ install_headers( ############################################################ -opts = [[], - ['-ansi'], - ['-std=iso9899:1990']] +opts = [['c'], + ['c', '-ansi'], + ['c', '-std=iso9899:1990'], + ['c++']] foreach header : _systemd_headers foreach opt : opts - name = ''.join([header] + opt) + name = ''.join([header, ':'] + opt) test('cc-' + name, check_compilation_sh, - args : cc.cmd_array() + ['-x', 'c', '-c'] + opt + + args : cc.cmd_array() + ['-c', '-x'] + opt + ['-Werror', '-include', join_paths(meson.current_source_dir(), header)]) endforeach