Open penguian opened 6 days ago
The current path definitions for um7 use:
um7
PATH
fcm
env.prepend_path("CPATH", ...)
env.prepend_path("LIBRARY_PATH", ...)
env.prepend_path("LD_LIBRARY_PATH", ...)
netcdf-fortran
Similarly to cice4 and other ACCESS-NRI Spack package definitions:
cice4
depends_on("fcm", ...)
istr = " ".join([ join_path((spec["oasis3-mct"].headers).cpp_flags, "psmile.MPI1"), join_path((spec["oasis3-mct"].headers).cpp_flags, "mct")]) ideps = ["netcdf-fortran",...] incs = " ".join([istr] + [(spec[d].headers).cpp_flags for d in ideps])
RPATH
def get_linker_args(self, spec, name): return " ".join( [(spec[name].libs).ld_flags, "-Wl,-rpath=" + join_path(spec[name].prefix, "lib")] ) ... lstr = "" ldeps = ["oasis3-mct", "netcdf-fortran"] libs = " ".join([lstr] + [self.get_linker_args(spec, d) for d in ldeps])
See also #113 for another um7-related issue.
The current path definitions for
um7
use:PATH
to locatefcm
.env.prepend_path("CPATH", ...)
to define paths to headers and Fortran modules.env.prepend_path("LIBRARY_PATH", ...)
to define paths to libraries at build time.env.prepend_path("LD_LIBRARY_PATH", ...)
to define the path tonetcdf-fortran
at runtime.Similarly to
cice4
and other ACCESS-NRI Spack package definitions:depends_on("fcm", ...)
would be preferable, since it allows for versioning.cice4
.RPATH
, similar to the following fromcice4
.See also #113 for another
um7
-related issue.