Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You'll need to edit either E3SM/components/$component/bld/configure OR E3SM/components/$component/cime_config/buildlib_cmake and make a PR to merge your change.

Permanently change macro settings based on the presence of a component

You can parse the entire compset (as opposed to just looking at the current component) by putting something like the following in the relevant cmake macro:

Code Block
if ("name-of-component" IN_LIST COMP_NAMES)
  # Make config change here
endif()

This can be useful when a global change is needed based on the presence of a component. A potential use case is change the configuration of a shared lib based on the presence of a component. For example, to change the Kokkos configuration if eamxx is an active component:

Code Block
if ("eamxx" IN_LIST COMP_NAMES)
  string(APPEND KOKKOS_OPTIONS " -DKokkos_ENABLE_OPENMP=ON")
endif()

Permanently add compile flags for a specific file

...