Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetCDF_INCLUDE_DIRS variable missing on Linux for Windows #37

Open
eesa10-bu opened this issue Jan 4, 2023 · 2 comments
Open

NetCDF_INCLUDE_DIRS variable missing on Linux for Windows #37

eesa10-bu opened this issue Jan 4, 2023 · 2 comments

Comments

@eesa10-bu
Copy link

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

@bolding
Copy link
Collaborator

bolding commented Jan 4, 2023 via email

@eesa10-bu
Copy link
Author

Hi Karsten,

Thanks. My version of cmake is 3.16.3 - it was the default one that installed with sudo apt-get install cmake - I would have expected a newer version, but that's life! Serves me right for mixing Linux and Windows.

Noel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants