Skip to content

Inconsistent NetCDF naming in CMake Config file #1140

@zbeekman

Description

@zbeekman

Environment Information

Feel free to skip this if the issue is related to documentation, a feature request, or general discussion.

  • What platform are you using? (please provide specific distribution/version in summary)
    • Linux
    • Windows
    • OSX
    • Other
    • NA
  • 32 and/or 64 bit?
    • 32-bit
    • 64-bit
  • What build system are you using?
    • autotools (configure)
    • cmake
  • Can you provide a sample netCDF file or C code to recreate the issue?
    • Yes (please attach to this issue, thank you!)
    • No
    • Not at this time

Summary of Issue

I'm working on integrating SEACAS-Exodus with a code I am working on. However, when we install NetCDF using CMake, then the cmake config files are installed as

lib/cmake/netCDF/netCDFConfig.cmake
lib/cmake/netCDF/netCDFConfigVersion.cmake
lib/cmake/netCDF/netCDFTargets-debug.cmake
lib/cmake/netCDF/netCDFTargets.cmake

However, SEACAS-Exodus calls find_package(NetCDF). This triggers a search for NetCDFConfig.cmake and netcdf-config.cmake. On case sensitive file systems this fails. If you switched to the all lower-case version, this should remediate this confusion and maintain backwards compatibility.

Steps to reproduce the behavior

Install NetCDF4 and then call CMake for the SEACAS-Exodus distribution something like:

cmake -DSEACASProj_ENABLE_SEACASExodus:BOOL=ON \
   -DSEACASProj_ENABLE_SEACASExodus_for:BOOL=ON \
   -DCMAKE_INSTALL_PREFIX:PATH=${TPL_DIR}/Install/SEACASExodus \
   -DSEACASProj_ENABLE_TESTS:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF \
   -DTPL_ENABLE_Netcdf:BOOL=ON -DTPL_ENABLE_MPI:BOOL=OFF \
   -DSEACASExodus_ENABLE_THREADSAFE:BOOL=OFF \
   -DNetCDF_DIR:PATH=${TPL_DIR}/Install/netCDF-4/lib/cmake/netcdf \
   -DHDF5_NO_SYSTEM_PATHS:BOOL=ON \
   -DSEACASProj_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=ON \
   /path/to/seacas-exodus-src

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