aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cython.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/cython.py')
-rw-r--r--mesonbuild/compilers/cython.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/compilers/cython.py b/mesonbuild/compilers/cython.py
index 763279e..9bbfebe 100644
--- a/mesonbuild/compilers/cython.py
+++ b/mesonbuild/compilers/cython.py
@@ -7,7 +7,7 @@ from __future__ import annotations
import typing as T
from .. import coredata
-from ..mesonlib import EnvironmentException, OptionKey
+from ..mesonlib import EnvironmentException, OptionKey, version_compare
from .compilers import Compiler
if T.TYPE_CHECKING:
@@ -40,6 +40,14 @@ class CythonCompiler(Compiler):
# compiler might though
return []
+ def get_dependency_gen_args(self, outtarget: str, outfile: str) -> T.List[str]:
+ if version_compare(self.version, '>=0.29.33'):
+ return ['-M']
+ return []
+
+ def get_depfile_suffix(self) -> str:
+ return 'dep'
+
def sanity_check(self, work_dir: str, environment: 'Environment') -> None:
code = 'print("hello world")'
with self.cached_compile(code, environment.coredata) as p: