diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-05-24 03:26:36 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-06-05 10:50:22 +0000 |
commit | efa9b75d5d21018b27f593ee65ea562d10d6dc2c (patch) | |
tree | 4df771de5d003863aa08676ae8c1b4a19b99ecad /mesonbuild/backend/ninjabackend.py | |
parent | 7fbab2c6e93af182703b813d5a1f962757743f26 (diff) | |
download | meson-efa9b75d5d21018b27f593ee65ea562d10d6dc2c.zip meson-efa9b75d5d21018b27f593ee65ea562d10d6dc2c.tar.gz meson-efa9b75d5d21018b27f593ee65ea562d10d6dc2c.tar.bz2 |
Set WINEPATH when running serialized executables
When the exe runner is `wine` or `wine32` or `wine64`, etc.
This allows people to run tests with wine.
Note that you also have to set WINEPATH to point to your custom
prefix(es) if your tests use external dependencies.
Closes https://github.com/mesonbuild/meson/issues/3620
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index b327338..6082c85 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -530,7 +530,11 @@ int dummy; # the project, we need to set PATH so the DLLs are found. We use # a serialized executable wrapper for that and check if the # CustomTarget command needs extra paths first. - if mesonlib.is_windows() or mesonlib.is_cygwin(): + is_cross = self.environment.is_cross_build() and \ + self.environment.cross_info.need_cross_compiler() and \ + self.environment.cross_info.need_exe_wrapper() + if mesonlib.for_windows(is_cross, self.environment) or \ + mesonlib.for_cygwin(is_cross, self.environment): extra_bdeps = target.get_transitive_build_target_deps() extra_paths = self.determine_windows_extra_paths(target.command[0], extra_bdeps) if extra_paths: |