wannier90: gfortran-10 support and libs property (#34278)

This commit is contained in:
Glenn Johnson 2022-12-05 04:43:23 -06:00 committed by GitHub
parent 05abea3a3a
commit 8332a59194
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,6 +80,12 @@ def edit(self, spec, prefix):
for key, value in substitutions.items():
filter_file(key, value, self.makefile_name)
if self.spec.satisfies("%gcc@10:"):
fflags = [
"-fallow-argument-mismatch",
]
filter_file(r"(^FCOPTS=.*)", r"\1 {0}".format(" ".join(fflags)), self.makefile_name)
if "@:2 +shared" in self.spec:
# this is to build a .shared wannier90 library
filter_file(
@ -188,3 +194,7 @@ def install(self, spec, prefix):
for file in find(join_path(self.stage.source_path, "src/obj"), "*.mod"):
install(file, self.prefix.modules)
@property
def libs(self):
return find_libraries("libwannier", self.prefix, shared=True, recursive=True)