diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-06-06 10:52:05 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-06-08 23:19:09 +0300 |
commit | 3efb51a958d81e40fb3e29481fc4c1887daefb7f (patch) | |
tree | 94269402745ebd1b2c69cc428c4b232df675f063 | |
parent | fb83223af9f82a94ee45c1d3716c7e05c94def07 (diff) | |
download | meson-3efb51a958d81e40fb3e29481fc4c1887daefb7f.zip meson-3efb51a958d81e40fb3e29481fc4c1887daefb7f.tar.gz meson-3efb51a958d81e40fb3e29481fc4c1887daefb7f.tar.bz2 |
backend/vs: "fix" handling of CustomTarget dependencies
This doesn't actually fix the problem, but it provides parity with what
is currently happening. I don't have access to a Windows machine to
further debug, however, so not breaking anything is the best I can do
ATM.
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index d14d5fd..6a182d9 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -270,12 +270,15 @@ class Vs2010Backend(backends.Backend): result[o.target.get_id()] = o.target return result.items() - def get_target_deps(self, t, recursive=False): - all_deps = {} + def get_target_deps(self, t: T.Dict[T.Any, build.Target], recursive=False): + all_deps: T.Dict[str, build.Target] = {} for target in t.values(): if isinstance(target, build.CustomTarget): for d in target.get_target_dependencies(): - all_deps[d.get_id()] = d + # FIXME: this isn't strictly correct, as the target doesn't + # Get dependencies on non-targets, such as Files + if isinstance(d, build.Target): + all_deps[d.get_id()] = d elif isinstance(target, build.RunTarget): for d in target.get_dependencies(): all_deps[d.get_id()] = d |