From 11b9ad2e29aa3b0a273a94379b18f2e429b3b555 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 8 Jul 2022 11:38:56 -0700 Subject: [PATCH] backends/backends: Add helpful message for getting rid of warning --- mesonbuild/backend/backends.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index c676d1397..4a68c572e 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -284,7 +284,7 @@ class Backend: if isinstance(t, build.CustomTarget): if warn_multi_output and len(t.get_outputs()) != 1: mlog.warning(f'custom_target {t.name!r} has more than one output! ' - 'Using the first one.') + f'Using the first one. Consider using `{t.name}[0]`.') filename = t.get_outputs()[0] elif isinstance(t, build.CustomTargetIndex): filename = t.get_outputs()[0]