0001-build-add-option-to-disable-tests.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. From 88f1605a826ca0c2ff02be6f4cf9ecabf68e8341 Mon Sep 17 00:00:00 2001
  2. From: James Hilliard <james.hilliard1@gmail.com>
  3. Date: Tue, 3 Mar 2020 15:27:51 -0700
  4. Subject: [PATCH] build: add option to disable tests
  5. When building for a product, tests are not needed.
  6. Besides, one test requires a C++ compiler, which is not always
  7. available.
  8. So, add an option to configure to disable building tests altogether.
  9. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  10. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
  11. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
  12. [Upstream status:
  13. https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/66]
  14. Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
  15. [yann.morin.1998@free.fr: backport from upstream]
  16. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
  17. ---
  18. meson.build | 4 +++-
  19. meson_options.txt | 4 ++++
  20. 2 files changed, 7 insertions(+), 1 deletion(-)
  21. diff --git a/meson.build b/meson.build
  22. index cdb66bc..714a86d 100644
  23. --- a/meson.build
  24. +++ b/meson.build
  25. @@ -84,7 +84,9 @@ subdir('src')
  26. if get_option('libraries')
  27. subdir('cursor')
  28. subdir('egl')
  29. - subdir('tests')
  30. + if get_option('tests')
  31. + subdir('tests')
  32. + endif
  33. if get_option('documentation')
  34. subdir('doc')
  35. endif
  36. diff --git a/meson_options.txt b/meson_options.txt
  37. index de588d1..4433fa0 100644
  38. --- a/meson_options.txt
  39. +++ b/meson_options.txt
  40. @@ -6,6 +6,10 @@ option('scanner',
  41. description: 'Compile wayland-scanner binary',
  42. type: 'boolean',
  43. value: 'true')
  44. +option('tests',
  45. + description: 'Compile Wayland tests',
  46. + type: 'boolean',
  47. + value: 'true')
  48. option('documentation',
  49. description: 'Build the documentation (requires Doxygen, dot, xmlto, xsltproc)',
  50. type: 'boolean',
  51. --
  52. 2.25.1