Skip to content

Commit

Permalink
BUG: Add missing custom_targets
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoneback committed Jan 14, 2025
1 parent 0457350 commit e22675e
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,46 @@ incdir_f2py = run_command(py,

inc_np = include_directories(incdir_numpy, incdir_f2py)


igrf_source = custom_target('igrfmodule.c',
input : ['OMMBV/igrf13.f'], # .f so no F90 wrappers
output : ['igrfmodule.c', 'igrf-f2pywrappers.f'],
command : [py, '-m', 'numpy.f2py', '@INPUT@', '-m', 'igrf', '--lower']
)
py.extension_module('igrf',
[
'OMMBV/igrf13.f'
igrf_source
],
incdir_f2py / 'fortranobject.c',
include_directories: inc_np,
dependencies : py_dep,
install : true
)

sources_source = custom_target('sourcesmodule.c',
input : ['OMMBV/sources.f', 'OMMBV/igrf13.f'], # .f so no F90 wrappers
output : ['sourcesmodule.c', 'sources-f2pywrappers.f'],
command : [py, '-m', 'numpy.f2py', '@INPUT@', '-m', 'igrf', '--lower']
)
py.extension_module('sources',
[
'OMMBV/sources.f',
'OMMBV/igrf13.f'
'OMMBV/igrf13.f',
sources_source
],
incdir_f2py / 'fortranobject.c',
include_directories: inc_np,
dependencies : py_dep,
install : true
)


fcoords_source = custom_target('_coordsmodule.c',
input : ['OMMBV/_coords.f'], # .f so no F90 wrappers
output : ['_coordsmodule.c', '_coords-f2pywrappers.f'],
command : [py, '-m', 'numpy.f2py', '@INPUT@', '-m', 'igrf', '--lower']
)
py.extension_module('fortran_coords',
[
'OMMBV/_coords.f'
Expand Down

0 comments on commit e22675e

Please sign in to comment.