0002-meson-only-require-cpp-for-tests.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From 4c2105312379b62dc84f6eaaf26e2ab293d51b92 Mon Sep 17 00:00:00 2001
  2. From: James Hilliard <james.hilliard1@gmail.com>
  3. Date: Fri, 16 Apr 2021 02:32:38 -0600
  4. Subject: [PATCH] meson: only require cpp for tests
  5. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
  6. [Upstream status:
  7. https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/130]
  8. Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
  9. [yann.morin.1998@free.fr: backport from upstream]
  10. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
  11. ---
  12. meson.build | 2 +-
  13. tests/meson.build | 16 +++++++++-------
  14. 2 files changed, 10 insertions(+), 8 deletions(-)
  15. diff --git a/meson.build b/meson.build
  16. index 12b4641..cdb66bc 100644
  17. --- a/meson.build
  18. +++ b/meson.build
  19. @@ -1,5 +1,5 @@
  20. project(
  21. - 'wayland', 'c', 'cpp',
  22. + 'wayland', 'c',
  23. version: '1.19.0',
  24. license: 'MIT',
  25. meson_version: '>= 0.52.1',
  26. diff --git a/tests/meson.build b/tests/meson.build
  27. index a32ac50..2e11af4 100644
  28. --- a/tests/meson.build
  29. +++ b/tests/meson.build
  30. @@ -64,15 +64,17 @@ executable(
  31. dependencies: test_runner_dep
  32. )
  33. -test(
  34. - 'cpp-compile-test',
  35. - executable(
  36. +if add_languages('cpp')
  37. + test(
  38. 'cpp-compile-test',
  39. - 'cpp-compile-test.cpp',
  40. - wayland_server_protocol_h,
  41. - include_directories: src_inc
  42. + executable(
  43. + 'cpp-compile-test',
  44. + 'cpp-compile-test.cpp',
  45. + wayland_server_protocol_h,
  46. + include_directories: src_inc
  47. + )
  48. )
  49. -)
  50. +endif
  51. sed_path = find_program('sed').path()
  52. --
  53. 2.31.1