Skip to content

NetCDF_INCLUDE_DIRS variable missing on Linux for Windows #37

@eesa10-bu

Description

@eesa10-bu

Hi,
I don't know if this is a known problem, but I was unable to run the cmake step on Linux for Windows (WSL - ubuntu). It exited with:

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find NetCDF (missing: NetCDF_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  extern/flexout/cmake/Modules/FindNetCDF.cmake:80 (find_package_handle_standard_args)
  extern/flexout/CMakeLists.txt:39 (find_package)

I solved the problem by changing line 19 of GOTM\code\extern\flexout\cmake\Modules\ FindNetCDF.cmake to
set(NetCDF_INCLUDE_DIRS ${includedir} CACHE STRING "NetCDF include directories" FORCE)
without FORCE the variable was not being set.

Regards, Noel

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