diff options
author | Martin Hostettler <textshell@uchuujin.de> | 2018-02-18 18:20:58 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-04-15 07:29:21 +0000 |
commit | 642e17aa6be5b6736b856961563377d10faa57aa (patch) | |
tree | 51565cc63723724e69f25c0cf282591fb2c791f6 /mesonbuild | |
parent | 3f7c6cf3d6a204e9665faad3c05bb5049f08ac74 (diff) | |
download | meson-642e17aa6be5b6736b856961563377d10faa57aa.zip meson-642e17aa6be5b6736b856961563377d10faa57aa.tar.gz meson-642e17aa6be5b6736b856961563377d10faa57aa.tar.bz2 |
compilers: is_library: Also detect .so files with version (using soregex)
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 480baa9..cd2d8eb 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -55,7 +55,6 @@ for _l in clike_langs: clike_suffixes += lang_suffixes[_l] clike_suffixes += ('h', 'll', 's') -# XXX: Use this in is_library()? soregex = re.compile(r'.*\.so(\.[0-9]+)?(\.[0-9]+)?(\.[0-9]+)?$') # All these are only for C-like languages; see `clike_langs` above. @@ -102,6 +101,10 @@ def is_object(fname): def is_library(fname): if hasattr(fname, 'fname'): fname = fname.fname + + if soregex.match(fname): + return True + suffix = fname.split('.')[-1] return suffix in lib_suffixes |