Fix case sensitivity in Fortran module names

pull/1868/head
Bálint Aradi 8 years ago committed by Jussi Pakkanen
parent c389f7cdc7
commit 809a5938ff
  1. 6
      mesonbuild/backend/ninjabackend.py
  2. 6
      test cases/fortran/8 module names/meson.build
  3. 6
      test cases/fortran/8 module names/mod1.f90
  4. 6
      test cases/fortran/8 module names/mod2.f90
  5. 7
      test cases/fortran/8 module names/test.f90

@ -1722,8 +1722,8 @@ rule FORTRAN_DEP_HACK
for line in f:
modmatch = modre.match(line)
if modmatch is not None:
modname = modmatch.group(1)
if modname.lower() == 'procedure':
modname = modmatch.group(1).lower()
if modname == 'procedure':
# MODULE PROCEDURE construct
continue
if modname in module_files:
@ -1743,7 +1743,7 @@ rule FORTRAN_DEP_HACK
for line in f:
usematch = usere.match(line)
if usematch is not None:
usename = usematch.group(1)
usename = usematch.group(1).lower()
if usename not in tdeps:
# The module is not provided by any source file. This
# is due to:

@ -0,0 +1,6 @@
project('mod_name_case', 'fortran')
sources = ['test.f90', 'mod1.f90', 'mod2.f90']
exe = executable('mod_name_case', sources)
test('mod_name_case', exe)

@ -0,0 +1,6 @@
module MyMod1
implicit none
integer, parameter :: myModVal1 = 1
end module MyMod1

@ -0,0 +1,6 @@
module mymod2
implicit none
integer, parameter :: myModVal2 = 2
end module mymod2

@ -0,0 +1,7 @@
program test
use mymod1
use MyMod2
integer, parameter :: testVar = myModVal1 + myModVal2
end program test
Loading…
Cancel
Save