-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathmeson.build
More file actions
99 lines (93 loc) · 2.32 KB
/
meson.build
File metadata and controls
99 lines (93 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
project('args.hxx', ['cpp'],
version: '6.4.15',
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_names = [
'action_flag',
'arg_flag_lists',
'arg_flag_lists_default',
'arg_flag_lists_replace_default',
'arg_flag_lists_sets',
'arg_flags',
'arg_to_non_arg_flag',
'argument_separation',
'bool_flags',
'choices_description',
'completion',
'completion_bad_cword',
'count_flag',
'custom_types',
'default_values',
'extra_positionals',
'get_assignable',
'get_program_line',
'global_options',
'group_nesting',
'group_validation_fail',
'help_flag',
'help_params',
'help_stream',
'help_underflow',
'hidden_options',
'implicit_values',
'integer_overflow',
'invalid_arg_parse',
'kickout_flags',
'mapping_types',
'matcher_validation',
'nargs',
'noexcept_completion',
'noexcept_completion_bad_cword',
'noexcept_matcher_validation',
'noexcept_mode',
'noexcept_nargs',
'noexcept_required_flags',
'noexcept_subparser_validation',
'noexcept_unsigned_negative',
'option_terminator',
'positional_and_lists',
'positional_lists',
'positional_lists_default',
'positional_lists_replace_default',
'positional_lists_sets',
'positional_unspecified',
'prefix_dd_style',
'prefix_windows_style',
'program_line_wrap',
'required_flags',
'simple_commands',
'single_flag_repeat',
'subparser_commands',
'subparser_commands_kickout',
'subparser_group_validation',
'subparser_help',
'subparser_kickout',
'subparser_validation',
'unified_match_lists',
'unknown_flags',
'unsigned_negative',
'value_parser',
'windows_h',
]
foreach t : test_names
test(t, executable('argstest-' + t,
sources: 'test' / (t + '.cxx'),
dependencies: args_dep))
endforeach
test('multiple_inclusion', executable('argstest-multiple_inclusion',
sources: ['test/multiple_inclusion.cxx', 'test/multiple_inclusion.aux.cxx'],
dependencies: args_dep))
endif