MetOffice / monio

Met Office NetCDF I/O (MONIO) written in C++ for file I/O in JEDI-based DA (JADA).
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Fixes for building outside of a bundle. #31

Closed DJDavies2 closed 11 months ago

DJDavies2 commented 11 months ago

Fixes #30. There are two issues:

  1. The failure in #30 is addressed by adding Fortran to the list of LANGUAGES in the project call.
  2. The next failure was this:
Found CMake version 3.22.2
CMake Error at /home/h01/frwd/cylc-run/mi-be984/share/installs/ecbuild/share/ecbuild/cmake/ecbuild_add_library.cmake:302 (add_library):
  Target "monio" links to target "NetCDF::NetCDF_CXX" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  /home/h01/frwd/cylc-run/mi-be984/share/installs/ecbuild/share/ecbuild/cmake/ecbuild_add_library.cmake:657 (ecbuild_add_library_impl)
  src/CMakeLists.txt:59 (ecbuild_add_library)

This was fixed by importing jedi-cmake to use its NetCDF find instead of the standard one; this enables the NetCDF CXX stuff to be found correctly.

Both of these failures are circumvented in mo-bundle due to previous imports and whatnot.