eagles-project / haero

A toolbox for constructing performance portable aerosol packages
Other
3 stars 3 forks source link

Make haero buildable within a subdirectory of a host project #477

Closed jeff-cohere closed 9 months ago

jeff-cohere commented 10 months ago

We're experiencing some issues building CIME-enabled E3SM cases while integrating mam4xx with EAMxx, because there are myriad build settings that must be passed from CIME to EAMxx's build system. These settings are being lost because Haero has no way currently to inherit build settings directly from EKAT.

Luca Bertagna thinks it would be relatively straightforward to add support for building Haero (and mam4xx) as part of EAMxx, rather than as installable libraries. Schematically, Haero's dependency on EKAT could be handled this way:

if (TARGET ekat)
  # haero can just link to ekat
else ()
  find_package(ekat)
  if (NOT ekat_FOUND)
    # ok, proceed to build from submodule
  endif()
endif()