diff options
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 5 | ||||
-rw-r--r-- | mesonbuild/compilers/fortran.py | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index debb4fb..493fc0d 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1826,7 +1826,7 @@ rule FORTRAN_DEP_HACK%s if compiler is None: self.fortran_deps[target.get_basename()] = {} return - modre = re.compile(r"\s*module\s+(\w+)", re.IGNORECASE) + modre = re.compile(r"\bmodule\s+(\w+)\s*$", re.IGNORECASE) module_files = {} for s in target.get_sources(): # FIXME, does not work for Fortran sources generated by @@ -1843,9 +1843,6 @@ rule FORTRAN_DEP_HACK%s modmatch = modre.match(line) if modmatch is not None: modname = modmatch.group(1).lower() - if modname == 'procedure': - # MODULE PROCEDURE construct - continue if modname in module_files: raise InvalidArguments( 'Namespace collision: module %s defined in ' diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index c29c4bd..a8e8e25 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -77,10 +77,7 @@ class FortranCompiler(Compiler): source_name = os.path.join(work_dir, 'sanitycheckf.f90') binary_name = os.path.join(work_dir, 'sanitycheckf') with open(source_name, 'w') as ofile: - ofile.write('''program prog - print *, "Fortran compilation is working." -end program prog -''') + ofile.write('print *, "Fortran compilation is working."; end') extra_flags = self.get_cross_extra_flags(environment, link=True) pc = subprocess.Popen(self.exelist + extra_flags + [source_name, '-o', binary_name]) pc.wait() |