diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-07-08 17:08:34 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-07-08 17:08:34 +0300 |
commit | 3a3be0f61be89288691a7d4d6268e89e1c22409c (patch) | |
tree | e9e5a04addf000ab2539a1fe0736481db6ca3b26 /environment.py | |
parent | 5f65255a66f8cbc6f5637bca2577e416a2c812f9 (diff) | |
download | meson-3a3be0f61be89288691a7d4d6268e89e1c22409c.zip meson-3a3be0f61be89288691a7d4d6268e89e1c22409c.tar.gz meson-3a3be0f61be89288691a7d4d6268e89e1c22409c.tar.bz2 |
Can now build object files in generators, too.
Diffstat (limited to 'environment.py')
-rw-r--r-- | environment.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/environment.py b/environment.py index a62a4a6..c6b9add 100644 --- a/environment.py +++ b/environment.py @@ -1068,6 +1068,7 @@ header_suffixes = ['h', 'hh', 'hpp', 'hxx', 'H'] cpp_suffixes = ['cc', 'cpp', 'cxx', 'h', 'hh', 'hpp', 'hxx', 'c++'] c_suffixes = ['c'] clike_suffixes = c_suffixes + cpp_suffixes +obj_suffixes = ['o', 'obj'] def is_header(fname): suffix = fname.split('.')[-1] @@ -1077,6 +1078,10 @@ def is_source(fname): suffix = fname.split('.')[-1] return suffix in clike_suffixes +def is_object(fname): + suffix = fname.split('.')[-1] + return suffix in obj_suffixes + class Environment(): private_dir = 'meson-private' log_dir = 'meson-logs' @@ -1158,10 +1163,13 @@ class Environment(): def is_header(self, fname): return is_header(fname) - + def is_source(self, fname): return is_source(fname) + def is_object(self, fname): + return is_object(fname) + def merge_options(self, options): for (name, value) in options.items(): if name not in self.coredata.user_options: |