o
    uJAfá
  ã                   @  s@   d dl mZ d dlmZ dZdZdZdZdZG dd	„ d	eƒZ	d
S )é    )Úannotations)ÚFileImpla‡  
! This procedure will not be exported and is not
! directly callable by users of this library.

module modfoo

implicit none
private
public :: {function_name}

contains

integer function internal_function()
    internal_function = 0
end function internal_function

integer function {function_name}()
    {function_name} = internal_function()
end function {function_name}

end module modfoo
z4
use modfoo

print *,{function_name}()

end program
af  project('{project_name}', 'fortran',
  version : '{version}',
  default_options : ['warning_level=3'])

# These arguments are only used to build the shared library
# not the executables that use the library.
lib_args = ['-DBUILDING_{utoken}']

shlib = shared_library('{lib_name}', '{source_file}',
  install : true,
  fortran_args : lib_args,
  gnu_symbol_visibility : 'hidden',
)

test_exe = executable('{test_exe_name}', '{test_source_file}',
  link_with : shlib)
test('{test_name}', test_exe)

# Make this library usable as a Meson subproject.
{ltoken}_dep = declare_dependency(
  include_directories: include_directories('.'),
  link_with : shlib)

pkg_mod = import('pkgconfig')
pkg_mod.generate(
  name : '{project_name}',
  filebase : '{ltoken}',
  description : 'Meson sample project.',
  subdirs : '{header_dir}',
  libraries : shlib,
  version : '{version}',
)
z†
implicit none

character(len=*), parameter :: PROJECT_NAME = "{project_name}"

print *,"This is project ", PROJECT_NAME

end program
z¾project('{project_name}', 'fortran',
  version : '{version}',
  default_options : ['warning_level=3'])

exe = executable('{exe_name}', '{source_name}',
  install : true)

test('basic', exe)
c                   @  s$   e Zd ZdZeZeZeZ	e
ZeZdS )ÚFortranProjectÚf90N)Ú__name__Ú
__module__Ú__qualname__Ú
source_extÚhello_fortran_templateÚexe_templateÚhello_fortran_meson_templateÚexe_meson_templateÚlib_fortran_templateÚlib_templateÚlib_fortran_meson_templateÚlib_meson_templateÚlib_fortran_test_templateÚlib_test_template© r   r   úJ/usr/lib/python3.10/site-packages/mesonbuild/templates/fortrantemplates.pyr   h   s    r   N)
Ú
__future__r   Úmesonbuild.templates.sampleimplr   r   r   r   r
   r   r   r   r   r   r   Ú<module>   s   "
