diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-05-11 14:41:22 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-05-14 02:16:35 +0300 |
commit | 57e55b1a9ddce282f0b5d0508139f0f06ce952e5 (patch) | |
tree | 88458aa2139c8c4749c4952e01c5fd3e59a51ef0 /mesonbuild/mesonlib.py | |
parent | 7ad8b5f221ed23ff9ca60349f76e91f79ecd211d (diff) | |
download | meson-57e55b1a9ddce282f0b5d0508139f0f06ce952e5.zip meson-57e55b1a9ddce282f0b5d0508139f0f06ce952e5.tar.gz meson-57e55b1a9ddce282f0b5d0508139f0f06ce952e5.tar.bz2 |
boost: Try finding libraries with the matching arch (fixes #7110)
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r-- | mesonbuild/mesonlib.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 6c1e466..b901ec9 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -1533,6 +1533,16 @@ def relpath(path: str, start: str) -> str: except (TypeError, ValueError): return path +def path_is_in_root(path: Path, root: Path, resolve: bool = False) -> bool: + # Check wheter a path is within the root directory root + try: + if resolve: + path.resolve().relative_to(root.resolve()) + else: + path.relative_to(root) + except ValueError: + return False + return True class LibType(Enum): |