diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2018-11-28 15:15:54 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-06 12:19:28 +0100 |
commit | 71d17b44e45c68b8d0b5189a8ebe8412ab99c622 (patch) | |
tree | 9d04aa8f84478659d162afb2fa2a63bbca01c23c /mesonbuild/mesonlib.py | |
parent | a0d478da39dbab0ce265f5b4997ccf29baa87242 (diff) | |
download | meson-71d17b44e45c68b8d0b5189a8ebe8412ab99c622.zip meson-71d17b44e45c68b8d0b5189a8ebe8412ab99c622.tar.gz meson-71d17b44e45c68b8d0b5189a8ebe8412ab99c622.tar.bz2 |
Fixed list_target_files and list_targets
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r-- | mesonbuild/mesonlib.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 98c2366..ef02940 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -268,10 +268,12 @@ class File: def relative_name(self): return os.path.join(self.subdir, self.fname) -def get_compiler_for_source(compilers, src): +def get_compiler_for_source(compilers, src, canfail=False): for comp in compilers: if comp.can_compile(src): return comp + if canfail: + return None raise MesonException('No specified compiler can handle file {!s}'.format(src)) def classify_unity_sources(compilers, sources): |