openloops: add check for added Fortran compiler (#34014)

This commit is contained in:
Bernhard Kaindl 2022-11-23 15:59:13 +01:00 committed by GitHub
parent b8d059e8f4
commit a845b1f984
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -263,6 +263,8 @@ def configure(self, spec, prefix):
f.write("process_lib_dir = {0}\n".format(self.spec.prefix.proclib))
f.write("cc = {0}\n".format(env["SPACK_CC"]))
f.write("cxx = {0}\n".format(env["SPACK_CXX"]))
if not self.compiler.fc:
raise InstallError(f"{self.spec.compiler} has no Fortran compiler in spack!")
f.write("fortran_compiler = {0}\n".format(env["SPACK_FC"]))
if self.spec.satisfies("@1.3.1") and not is_intel:
f.write("gfortran_f_flags = -ffree-line-length-none\n")