Don't use dyndep scanner when preprocessing

Fixes #11504
pull/10058/merge
Volker Weißmann 2 years ago committed by Xavier Claessens
parent 1fdcc30ae6
commit f5fa56fdfa
  1. 2
      mesonbuild/backend/ninjabackend.py
  2. 4
      test cases/fortran/22 preprocess/main.f90
  3. 7
      test cases/fortran/22 preprocess/meson.build

@ -2954,6 +2954,8 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
def add_dependency_scanner_entries_to_element(self, target, compiler, element, src):
if not self.should_use_dyndeps_for_target(target):
return
if isinstance(target, build.CompileTarget):
return
extension = os.path.splitext(src.fname)[1][1:]
if extension != 'C':
extension = extension.lower()

@ -0,0 +1,4 @@
#define MYDEF program
MYDEF foo
write (*,*) 'Hello, world!'
end MYDEF foo

@ -0,0 +1,7 @@
project('preprocess', 'fortran')
fc = meson.get_compiler('fortran')
pp_files = fc.preprocess('main.f90', output: '@PLAINNAME@')
library('foo', pp_files)
Loading…
Cancel
Save