Skip to content

Commit

Permalink
Use system nf-config instead of conda env
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon committed Jun 6, 2024
1 parent be0b404 commit ae49ac1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
env:
DEBUG: 1
FC: ${{ matrix.compiler }}
NF_CONFIG: /usr/bin/nf-config

- name: Run Python module as script
run: |
Expand All @@ -82,6 +83,7 @@ jobs:
env:
DEBUG: 0
FC: ${{ matrix.compiler }}
NF_CONFIG: /usr/bin/nf-config

- name: Non-NetCDF compile and run
run: |
Expand Down
8 changes: 6 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ DEBUG ?= 0
# Default to NetCDF build
NC ?= 1

# Default to first `nf-config` on PATH
NF_CONFIG ?= nf-config

# Compile flags
$(info DEBUG setting: '$(DEBUG)')
ifeq ($(DEBUG), 0)
Expand Down Expand Up @@ -47,9 +50,10 @@ $(info FCFLAGS: '$(FCFLAGS)')
LIBS :=
INC :=
$(info NC setting: '$(NC)')
$(info NF_CONFIG setting: '$(NF_CONFIG)')
ifeq ($(NC), 1)
NETCDF_FLIBS := $(shell nf-config --flibs)
NETCDF_INC := -I$(shell nf-config --includedir)
NETCDF_FLIBS := $(shell $(NF_CONFIG) --flibs)
NETCDF_INC := -I$(shell $(NF_CONFIG) --includedir)
#
LIBS += $(NETCDF_FLIBS)
INC += $(NETCDF_INC)
Expand Down

0 comments on commit ae49ac1

Please sign in to comment.