Skip to content

Commit

Permalink
build: update meson files for building on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
smwesten-usgs committed Jan 8, 2024
1 parent d591410 commit ac83a67
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ add_project_arguments(fc.get_supported_arguments(compile_args), language: 'fortr
add_project_arguments(cc.get_supported_arguments(c_compile_args), language: 'c')
add_project_link_arguments(fc.get_supported_arguments(link_args), language: 'fortran')

include_directories('C:/Program Files/netCDF 4.9.0/include')
#include_directories('C:/Program Files/netCDF 4.9.0/include')

subdir('src')
subdir('test/unit_tests')
6 changes: 4 additions & 2 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,21 @@ swbstats2_src = files(
subdir('proj4')

dependencies = [
meson.get_compiler('cpp').find_library('netcdf', dirs : ['C:/Program Files/netCDF 4.9.0/lib/'])
# meson.get_compiler('cpp').find_library('netcdf')
# meson.get_compiler('cpp').find_library('netcdf', dirs : ['C:/Program Files/netCDF 4.9.0/lib/'])
meson.get_compiler('cpp').find_library('netcdf')
]
swb_library = static_library('swb_library', swb_src, link_with: [swb_external])

executable('swb2',
swb_src,
link_with: [swb_external],
link_language : 'fortran',
dependencies : dependencies,
install: true)

executable('swbstats2',
swbstats2_src,
link_with: [swb_external],
link_language : 'fortran',
dependencies : dependencies,
install: true)
3 changes: 0 additions & 3 deletions src/netcdf4_support.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3291,9 +3291,6 @@ subroutine nf_create(NCFILE, sFilename, iLU)
character (len=*) :: sFilename
integer (c_int), optional :: iLU

character (len=256) :: sBuf
call getcwd(sBuf)

call nf_trap(nc_create(path=trim(fortran_to_c_string(sFilename)), &
cmode=NC_NETCDF4, &
ncidp=NCFILE%iNCID), &
Expand Down
1 change: 1 addition & 0 deletions test/unit_tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ swbtest_src = files(
executable('swbtest',
swbtest_src,
link_with: [swb_external, swb_library],
link_language: 'fortran',
dependencies : dependencies,
install: true)

0 comments on commit ac83a67

Please sign in to comment.