0001-Make-examples-build-selectable.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 6c0b9ad7822d9e9c74b787914cb766d27a358258 Mon Sep 17 00:00:00 2001
  2. From: Giulio Benetti <giulio.benetti@benettiengineering.com>
  3. Date: Tue, 20 May 2025 22:34:16 +0200
  4. Subject: [PATCH] Make examples build selectable
  5. Sometimes we don't need to build examples and increase some dependency we
  6. don't have(i.e. bits/pthreadtypes.h in musl) so let's add examples option
  7. true by default.
  8. Upstream: https://github.com/linux-nvme/libnvme/pull/1014
  9. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
  10. ---
  11. meson.build | 4 +++-
  12. meson_options.txt | 1 +
  13. 2 files changed, 4 insertions(+), 1 deletion(-)
  14. diff --git a/meson.build b/meson.build
  15. index 279245ac..4d819178 100644
  16. --- a/meson.build
  17. +++ b/meson.build
  18. @@ -282,7 +282,9 @@ subdir('libnvme')
  19. if get_option('tests')
  20. subdir('test')
  21. endif
  22. -subdir('examples')
  23. +if get_option('examples')
  24. + subdir('examples')
  25. +endif
  26. subdir('doc')
  27. ################################################################################
  28. diff --git a/meson_options.txt b/meson_options.txt
  29. index 051b4ae5..48a93dae 100644
  30. --- a/meson_options.txt
  31. +++ b/meson_options.txt
  32. @@ -6,6 +6,7 @@ option('rstdir', type : 'string', value : '', description : 'directory for ReST
  33. option('docs', type : 'combo', choices : ['false', 'html', 'man', 'rst', 'all'], description : 'install documentation')
  34. option('docs-build', type : 'boolean', value : false, description : 'build documentation')
  35. +option('examples', type : 'boolean', value : true, description : 'build examples')
  36. option('tests', type : 'boolean', value : true, description : 'build tests')
  37. option('python', type : 'feature', value: 'auto', description : 'Generate libnvme python bindings')
  38. --
  39. 2.39.5