cbflib: improve syntax for querying %gcc version (#47280)

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
Massimiliano Culpo 2024-10-29 15:33:41 +01:00 committed by GitHub
parent 20a6b22f78
commit ffd7830bfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,8 +49,7 @@ def edit(self, spec, prefix):
mf.filter(r"^C\+\+.+", "C++ = {0}".format(spack_cxx))
mf.filter("gfortran", spack_fc)
mf.filter(r"^INSTALLDIR .+", "INSTALLDIR = {0}".format(prefix))
real_version = Version(self.compiler.get_real_version())
if real_version >= Version("10"):
if self.spec.satisfies("%gcc@10:"):
mf.filter(r"^F90FLAGS[ \t]*=[ \t]*(.+)", "F90FLAGS = \\1 -fallow-invalid-boz")
def build(self, spec, prefix):