aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-05-13 11:32:28 -0700
committerGitHub <noreply@github.com>2020-05-13 11:32:28 -0700
commit85708facaea88f0909e3e58eb42738eb11729b88 (patch)
tree8b5a2942f8b84bdd402486aec2883e7832010c1b /mesonbuild/build.py
parentd526af89ca0e52fa076a805e4f585d16dbd1562a (diff)
parent1dee6c618d879c20bf0a70eebc54bc8caf47716f (diff)
downloadmeson-85708facaea88f0909e3e58eb42738eb11729b88.zip
meson-85708facaea88f0909e3e58eb42738eb11729b88.tar.gz
meson-85708facaea88f0909e3e58eb42738eb11729b88.tar.bz2
Merge pull request #6620 from jon-turney/test-output-check
Add a mechanism for validating meson output in tests
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 2ba7c59..fdfca73 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -535,6 +535,9 @@ class BuildTarget(Target):
repr_str = "<{0} {1}: {2}>"
return repr_str.format(self.__class__.__name__, self.get_id(), self.filename)
+ def __str__(self):
+ return "{}".format(self.name)
+
def validate_install(self, environment):
if self.for_machine is MachineChoice.BUILD and self.need_install:
if environment.is_cross_build():
@@ -1111,7 +1114,7 @@ You probably should put it in link_with instead.''')
if not isinstance(t, (Target, CustomTargetIndex)):
raise InvalidArguments('{!r} is not a target.'.format(t))
if not t.is_linkable_target():
- raise InvalidArguments('Link target {!r} is not linkable.'.format(t))
+ raise InvalidArguments("Link target '{!s}' is not linkable.".format(t))
if isinstance(self, SharedLibrary) and isinstance(t, StaticLibrary) and not t.pic:
msg = "Can't link non-PIC static library {!r} into shared library {!r}. ".format(t.name, self.name)
msg += "Use the 'pic' option to static_library to build with PIC."