summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/__init__.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-08-27 11:02:09 -0400
committerXavier Claessens <xclaesse@gmail.com>2023-08-29 13:34:23 -0400
commit494bdbd3345d1c2d20cf2520249962bd32fc61e6 (patch)
tree9c543fe1c84c8d2b58f97f39f847ed8c53a9be63 /mesonbuild/modules/__init__.py
parent4eb9c84cf97427a11af7ec928c849e4289862202 (diff)
downloadmeson-494bdbd3345d1c2d20cf2520249962bd32fc61e6.tar.gz
gnome: Fix crash in gtkdoc and generate_gir in C++ projects
gtkdoc() and generate_gir() methods assumes there is a C compiler, but pure C++ projects might not add it explicitly. Fixes: #12162
Diffstat (limited to 'mesonbuild/modules/__init__.py')
-rw-r--r--mesonbuild/modules/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
index 57c169d0b..eef67a1c7 100644
--- a/mesonbuild/modules/__init__.py
+++ b/mesonbuild/modules/__init__.py
@@ -167,6 +167,8 @@ class ModuleState:
else:
yield self._interpreter.build_incdir_object([d])
+ def add_language(self, lang: str, for_machine: MachineChoice) -> None:
+ self._interpreter.add_languages([lang], True, for_machine)
class ModuleObject(HoldableObject):
"""Base class for all objects returned by modules