diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-02-18 17:39:51 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-02-19 18:18:39 +0200 |
commit | 72865a2773a2beb4ea570ecbd7d334866099130f (patch) | |
tree | c40687d56d4c55ce71ea9d9dd20827f780df31ba /mesonbuild | |
parent | 79f7328d6a010e56c28eb9442b61931cf13b04e6 (diff) | |
download | meson-72865a2773a2beb4ea570ecbd7d334866099130f.zip meson-72865a2773a2beb4ea570ecbd7d334866099130f.tar.gz meson-72865a2773a2beb4ea570ecbd7d334866099130f.tar.bz2 |
Fix combining C and Fortran. Closes #8377.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index b5f46df..58fd5c6 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2513,15 +2513,18 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) element.add_item('DEPFILE', dep_file) element.add_item('ARGS', commands) - self.add_dependency_scanner_entries_to_element(target, compiler, element) + self.add_dependency_scanner_entries_to_element(target, compiler, element, src) self.add_build(element) assert(isinstance(rel_obj, str)) assert(isinstance(rel_src, str)) return (rel_obj, rel_src.replace('\\', '/')) - def add_dependency_scanner_entries_to_element(self, target, compiler, element): + def add_dependency_scanner_entries_to_element(self, target, compiler, element, src): if not self.should_use_dyndeps_for_target(target): return + extension = os.path.splitext(src.fname)[1][1:] + if not (extension in compilers.lang_suffixes['fortran'] or extension in compilers.lang_suffixes['cpp']): + return dep_scan_file = self.get_dep_scan_file_for(target) element.add_item('dyndep', dep_scan_file) element.add_orderdep(dep_scan_file) |