diff options
author | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2018-07-18 13:37:35 +0200 |
---|---|---|
committer | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2018-07-18 13:52:49 +0200 |
commit | bfb4fd3db104ce9d65129e8a24ab940ae2c968c5 (patch) | |
tree | a8b9ed7dcba68001a5663621da816998c48adeec /meson.build | |
parent | 2b118a33f65866295eeb716c9bc6401082ca4c8e (diff) | |
download | libnitrokey-bfb4fd3db104ce9d65129e8a24ab940ae2c968c5.tar.gz libnitrokey-bfb4fd3db104ce9d65129e8a24ab940ae2c968c5.tar.bz2 |
meson: test_minimal is written in C
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 21e79f5..148fadf 100644 --- a/meson.build +++ b/meson.build @@ -11,12 +11,20 @@ cxx = meson.get_compiler('cpp') host_system = host_machine.system() pkg = import('pkgconfig') -test_cflags = [ +common_flags = [ '-Wno-unused-function', '-Wcast-qual', +] +test_cxxflags = common_flags + [ '-Woverloaded-virtual', ] -add_project_arguments(cxx.get_supported_arguments(test_cflags), language : 'cpp') +test_cflags = common_flags +add_project_arguments(cxx.get_supported_arguments(test_cxxflags), language : 'cpp') +if get_option('offline-tests') + add_languages('c', required: get_option('offline-tests')) + c = meson.get_compiler('c') + add_project_arguments(c.get_supported_arguments(test_cflags), language : 'c') +endif dep_hidapi = dependency('hidapi-libusb') @@ -129,7 +137,7 @@ tests = [] if get_option('offline-tests') tests += [ ['test_offline', 'test_offline.cc'], - ['test_minimal', 'test_minimal.cc'], + ['test_minimal', 'test_minimal.c'], ] endif if get_option('tests') |