From 9f68fb1e192b22381317ea0cab8f9ef1e75b2f7b Mon Sep 17 00:00:00 2001 From: mjreno Date: Mon, 13 Nov 2023 10:46:26 -0500 Subject: [PATCH] ci test 12 --- .github/workflows/ci-nc.yml | 12 ++++++------ meson.build | 10 ++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-nc.yml b/.github/workflows/ci-nc.yml index 3cb3eef22f3..914c6607a1a 100644 --- a/.github/workflows/ci-nc.yml +++ b/.github/workflows/ci-nc.yml @@ -98,8 +98,8 @@ jobs: #cat /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc sed -i "s|libdir=/home/runner/micromamba/envs/modflow6//home/runner/micromamba/envs/modflow6/lib|libdir=/home/runner/micromamba/envs/modflow6/lib|g" /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc #cat /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc - pkg-config --cflags netcdf-fortran - pkg-config --libs netcdf-fortran + /home/runner/micromamba/envs/modflow6/bin/pkg-config --cflags netcdf-fortran + /home/runner/micromamba/envs/modflow6/bin/pkg-config --libs netcdf-fortran - name: Edit netcdf-fortran.pc if: runner.os == 'macOS' @@ -111,16 +111,16 @@ jobs: #cat /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc sed -i '' -e "s|libdir=/Users/runner/micromamba/envs/modflow6//Users/runner/micromamba/envs/modflow6/lib|libdir=/Users/runner/micromamba/envs/modflow6/lib|g" /Users/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc #cat /home/runner/micromamba/envs/modflow6/lib/pkgconfig/netcdf-fortran.pc - pkg-config --cflags netcdf-fortran - pkg-config --libs netcdf-fortran + /home/runner/micromamba/envs/modflow6/bin/pkg-config --cflags netcdf-fortran + /home/runner/micromamba/envs/modflow6/bin/pkg-config --libs netcdf-fortran - name: Build modflow6 working-directory: modflow6 run: | nc-config --all nf-config - pkg-config --cflags netcdf-fortran - pkg-config --libs netcdf-fortran + /home/runner/micromamba/envs/modflow6/bin/pkg-config --cflags netcdf-fortran + /home/runner/micromamba/envs/modflow6/bin/pkg-config --libs netcdf-fortran meson setup builddir -Ddebug=false --prefix=$(pwd) --libdir=bin meson install -C builddir diff --git a/meson.build b/meson.build index 3435fd007a3..740d1ab08d6 100644 --- a/meson.build +++ b/meson.build @@ -196,6 +196,16 @@ if netcdf.found() extra_cmp_args += [ '-D__WITH_NETCDF__' ] dependencies += [ netcdf ] #add_project_dependencies(netcdf, language: 'fortran') + code = ''' + program meson_netcdf_link_test + use netcdf + print *, trim(nf90_inq_libvers()) + end program meson_netcdf_link_test + ''' + result = fc.links(code, dependencies : netcdf, name : 'NetCDF link check') + if result == false + message('Linking against NetCDF failed!') + endif else with_netcdf = false endif