diff --git a/exp/MOM_compile.csh b/exp/MOM_compile.csh index e4cd3e14d..40f6b3adf 100755 --- a/exp/MOM_compile.csh +++ b/exp/MOM_compile.csh @@ -151,6 +151,7 @@ if ( $cosima_version ) then echo "Including COSIMA version in build" # Build version. This prevents builds outside a git repo, so only enabled for COSIMA builds source ./version_compile.csh + set cppDefs = "$cppDefs -DCOSIMA_VERSION" endif # Build FMS. diff --git a/src/mom5/ocean_core/ocean_model.F90 b/src/mom5/ocean_core/ocean_model.F90 index 387515687..9942bb78e 100644 --- a/src/mom5/ocean_core/ocean_model.F90 +++ b/src/mom5/ocean_core/ocean_model.F90 @@ -334,7 +334,9 @@ module ocean_model_mod use ocean_drifters_mod, only: ocean_drifters_init, update_ocean_drifters, ocean_drifters_end use wave_types_mod, only: ocean_wave_type use ocean_wave_mod, only: ocean_wave_init, ocean_wave_end, ocean_wave_model -use version_mod, only: MOM_COMMIT_HASH +#if defined(COSIMA_VERSION) + use version_mod, only: MOM_COMMIT_HASH +#endif #if defined(ACCESS_CM) || defined(ACCESS_OM) use auscom_ice_mod, only: auscom_ice_init