diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-12-10 21:49:41 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-12-10 21:49:41 +0200 |
commit | 43b07729aa058ce8af1aa4d7f3c445f61f39c42a (patch) | |
tree | a3784e2b3f5fdf0dbde333cdeaeb20ead1889a15 /backends.py | |
parent | 7ed515dacc726b6413ff720b7c125670b60543a1 (diff) | |
download | meson-43b07729aa058ce8af1aa4d7f3c445f61f39c42a.zip meson-43b07729aa058ce8af1aa4d7f3c445f61f39c42a.tar.gz meson-43b07729aa058ce8af1aa4d7f3c445f61f39c42a.tar.bz2 |
Reworked swift code so now can use multiple source files in one target.
Diffstat (limited to 'backends.py')
-rw-r--r-- | backends.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/backends.py b/backends.py index 03ecd4b..70b206a 100644 --- a/backends.py +++ b/backends.py @@ -132,23 +132,23 @@ class Backend(): self.write_benchmark_file(datafile) datafile.close() - def has_vala(self, target): + def has_source_suffix(self, target, suffix): for s in target.get_sources(): - if s.endswith('.vala'): + if s.endswith(suffix): return True return False + def has_vala(self, target): + return self.has_source_suffix(target, '.vala') + def has_rust(self, target): - for s in target.get_sources(): - if s.endswith('.rs'): - return True - return False + return self.has_source_suffix(target, '.rs') def has_cs(self, target): - for s in target.get_sources(): - if s.endswith('.cs'): - return True - return False + return self.has_source_suffix(target, '.cs') + + def has_swift(self, target): + return self.has_source_suffix(target, '.swift') def determine_linker(self, target, src): if isinstance(target, build.StaticLibrary): |