diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-15 20:46:07 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-04-15 21:04:38 +0300 |
commit | aef72f6a45908c9d376c12de7f5778e77f5ad668 (patch) | |
tree | dd89b25f71f43152b6030656f0d7827c7f633b95 | |
parent | Merge pull request #85 from dhmemi/patch-1 (diff) | |
download | args.hxx-master.tar.xz |
-rw-r--r-- | meson.build | 37 | ||||
-rw-r--r-- | meson_options.txt | 3 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..a388acd --- /dev/null +++ b/meson.build @@ -0,0 +1,37 @@ +project('args.hxx', ['cpp'], + version: '6.2.2', + default_options: 'cpp_std=c++11', + license: 'MIT' +) + +# This is a header-only lib, all we need to do is include it +args_dep = declare_dependency( + include_directories: include_directories('.') +).as_system('system') + +install_headers('args.hxx') + +# examples +if get_option('examples') +executable('gitlike', sources: 'examples/gitlike.cxx', dependencies: args_dep) +executable('completion', sources: 'examples/completion.cxx', dependencies: args_dep) +endif + +# tests +if get_option('unittests') +test('argstest', executable('argstest', + sources: 'test.cxx', + dependencies: args_dep +)) + +test('argstest-multiple-inclusion', executable('argstest-multiple-inclusion', + sources: [ 'test/multiple_inclusion_1.cxx', 'test/multiple_inclusion_2.cxx' ], + dependencies: args_dep +)) + +test('argstest-windows-h', executable('argstest-windows-h', + sources: 'test/windows_h.cxx', + dependencies: args_dep +)) +endif + diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..708ba69 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,3 @@ +option('examples', description: 'Build examples', type: 'boolean', value: false) +option('unittests', description: 'Build unit tests', type: 'boolean', value: false) + |