From e3c72ad7c796fb69db998e87e1e2e4e7c834e081 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 26 Jul 2021 14:38:44 -0700 Subject: compilers: Fix extra_args parameter which can also be a callable taking a CompileChekcMode as an argumetn and returning a list of strings. --- mesonbuild/compilers/cuda.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/cuda.py') diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py index 0bdc145..485bbfb 100644 --- a/mesonbuild/compilers/cuda.py +++ b/mesonbuild/compilers/cuda.py @@ -24,7 +24,7 @@ from ..mesonlib import ( is_windows, LibType, OptionKey, ) from .compilers import (Compiler, cuda_buildtype_args, cuda_optimization_args, - cuda_debug_args) + cuda_debug_args, CompileCheckMode) if T.TYPE_CHECKING: from ..build import BuildTarget @@ -584,7 +584,7 @@ class CudaCompiler(Compiler): def has_header_symbol(self, hname: str, symbol: str, prefix: str, env: 'Environment', *, - extra_args: T.Optional[T.List[str]] = None, + extra_args: T.Union[None, T.List[str], T.Callable[[CompileCheckMode], T.List[str]]] = None, dependencies: T.Optional[T.List['Dependency']] = None) -> T.Tuple[bool, bool]: if extra_args is None: extra_args = [] -- cgit v1.1