aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-07-30 16:39:04 +0300
committerGitHub <noreply@github.com>2020-07-30 16:39:04 +0300
commitbbf8533a97481685d6e840de3d44372bae5d620e (patch)
tree171cc260b1f53dbba42e1504d7c629d6b78de95b /mesonbuild/backend/backends.py
parent8da1b29899e795d87f0a4e51adb532119af48727 (diff)
parent7ef51abfc565b147273097201f8eb286b1688736 (diff)
downloadmeson-bbf8533a97481685d6e840de3d44372bae5d620e.zip
meson-bbf8533a97481685d6e840de3d44372bae5d620e.tar.gz
meson-bbf8533a97481685d6e840de3d44372bae5d620e.tar.bz2
Merge pull request #7494 from keszybz/fix-two-warnings
Fix two warnings
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index e053f67..c84bb75 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -184,9 +184,9 @@ class Backend:
self.build_to_src = mesonlib.relpath(self.environment.get_source_dir(),
self.environment.get_build_dir())
- def get_target_filename(self, t):
+ def get_target_filename(self, t, *, warn_multi_output: bool = True):
if isinstance(t, build.CustomTarget):
- if len(t.get_outputs()) != 1:
+ if warn_multi_output and len(t.get_outputs()) != 1:
mlog.warning('custom_target {!r} has more than one output! '
'Using the first one.'.format(t.name))
filename = t.get_outputs()[0]
@@ -262,7 +262,7 @@ class Backend:
return self.build_to_src
def get_target_private_dir(self, target):
- return os.path.join(self.get_target_filename(target) + '.p')
+ return os.path.join(self.get_target_filename(target, warn_multi_output=False) + '.p')
def get_target_private_dir_abs(self, target):
return os.path.join(self.environment.get_build_dir(), self.get_target_private_dir(target))