Skip to content

Commit a4dad98

Browse files
giuliobenettiigaw
authored andcommitted
examples: Make examples build selectable
Sometimes we don't need to build examples and increase some dependency we don't have(i.e. bits/pthreadtypes.h in musl) so let's add examples option true by default. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
1 parent 9b3ab85 commit a4dad98

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ subdir('libnvme')
282282
if get_option('tests')
283283
subdir('test')
284284
endif
285-
subdir('examples')
285+
if get_option('examples')
286+
subdir('examples')
287+
endif
286288
subdir('doc')
287289

288290
################################################################################

meson_options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ option('rstdir', type : 'string', value : '', description : 'directory for ReST
66

77
option('docs', type : 'combo', choices : ['false', 'html', 'man', 'rst', 'all'], description : 'install documentation')
88
option('docs-build', type : 'boolean', value : false, description : 'build documentation')
9+
option('examples', type : 'boolean', value : true, description : 'build examples')
910
option('tests', type : 'boolean', value : true, description : 'build tests')
1011

1112
option('python', type : 'feature', value: 'auto', description : 'Generate libnvme python bindings')

0 commit comments

Comments
 (0)