Skip to content

Use PkgConfig as a fallback for finding NetCDF #1940

@kieranricardo

Description

@kieranricardo

Hi there,

I had some trouble installing ParallelIO on the HPC system I'm on, and I was able fix it by replacing

find_package (NetCDF REQUIRED COMPONENTS C Fortran)

with

  find_package (NetCDF COMPONENTS C Fortran)
  if (NOT NetCDF_Fortran_FOUND)
    include(FindPkgConfig)
    pkg_check_modules(NetCDF_Fortran REQUIRED IMPORTED_TARGET "netcdf-fortran")
  endif()

It's a non breaking change that'll make ParallelIO more portable so I thought I'd see if there'd be interest in adding this in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions