diff options
author | Andreas Kässens <kaessens@sra.uni-hannover.de> | 2024-07-12 11:21:54 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2024-07-12 11:13:11 -0700 |
commit | f5d66b4932f94fbe78058e617c2d83a454107008 (patch) | |
tree | 56ef8c40df04b3d257d0123e9adfac8aad6aa5d1 | |
parent | 4172cbd0fba77540490c370dda074f03ca4b9c33 (diff) | |
download | meson-f5d66b4932f94fbe78058e617c2d83a454107008.zip meson-f5d66b4932f94fbe78058e617c2d83a454107008.tar.gz meson-f5d66b4932f94fbe78058e617c2d83a454107008.tar.bz2 |
backend/backends: Fix type assertions in backend
Test dependencies can be of type CustomTargetIndex,
similar to other targets.
-rw-r--r-- | mesonbuild/backend/backends.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 0defad6..c6fe4f0 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -1171,7 +1171,7 @@ class Backend: def determine_windows_extra_paths( self, target: T.Union[build.BuildTarget, build.CustomTarget, build.CustomTargetIndex, programs.ExternalProgram, mesonlib.File, str], - extra_bdeps: T.Sequence[T.Union[build.BuildTarget, build.CustomTarget]]) -> T.List[str]: + extra_bdeps: T.Sequence[T.Union[build.BuildTarget, build.CustomTarget, build.CustomTargetIndex]]) -> T.List[str]: """On Windows there is no such thing as an rpath. We must determine all locations of DLLs that this exe @@ -1231,7 +1231,7 @@ class Backend: exe_wrapper = self.environment.get_exe_wrapper() machine = self.environment.machines[exe.for_machine] if machine.is_windows() or machine.is_cygwin(): - extra_bdeps: T.List[T.Union[build.BuildTarget, build.CustomTarget]] = [] + extra_bdeps: T.List[T.Union[build.BuildTarget, build.CustomTarget, build.CustomTargetIndex]] = [] if isinstance(exe, build.CustomTarget): extra_bdeps = list(exe.get_transitive_build_target_deps()) extra_paths = self.determine_windows_extra_paths(exe, extra_bdeps) @@ -1428,7 +1428,7 @@ class Backend: continue result[arg.get_id()] = arg for dep in t.depends: - assert isinstance(dep, (build.CustomTarget, build.BuildTarget)) + assert isinstance(dep, (build.CustomTarget, build.BuildTarget, build.CustomTargetIndex)) result[dep.get_id()] = dep return result |