diff options
author | Bryce Allen <bdallen@uchicago.edu> | 2023-01-10 07:24:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 13:24:02 +0100 |
commit | 03a2feef88f364188a0a8db188fde8a0217caf98 (patch) | |
tree | 8c555e4a4ee3ff46476854ee4dbff8f78b97d857 | |
parent | 416615f30b722c42df1128694d009e4a9496df2a (diff) | |
download | spack-03a2feef88f364188a0a8db188fde8a0217caf98.tar.gz spack-03a2feef88f364188a0a8db188fde8a0217caf98.tar.bz2 spack-03a2feef88f364188a0a8db188fde8a0217caf98.tar.xz spack-03a2feef88f364188a0a8db188fde8a0217caf98.zip |
pfunit: fix max_array_rank for 4+, line len (#34713)
* pfunit: fix max_array_rank for 4+, line len
* pfunit: only use fortran flags when necessary
* pfunit: fix, version ranges are inclusive
-rw-r--r-- | var/spack/repos/builtin/packages/pfunit/package.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/pfunit/package.py b/var/spack/repos/builtin/packages/pfunit/package.py index 44595bafdb..05cb31a39a 100644 --- a/var/spack/repos/builtin/packages/pfunit/package.py +++ b/var/spack/repos/builtin/packages/pfunit/package.py @@ -113,20 +113,26 @@ class Pfunit(CMakePackage): self.define_from_variant("BUILD_SHARED", "shared"), "-DCMAKE_Fortran_MODULE_DIRECTORY=%s" % spec.prefix.include, self.define_from_variant("BUILD_DOCS", "docs"), - "-DMAX_ASSERT_RANK=%s" % spec.variants["max_array_rank"].value, ] - if self.spec.satisfies("%gcc@10:"): - args.append("-DCMAKE_Fortran_FLAGS_DEBUG=-g -O2 -fallow-argument-mismatch") - if spec.satisfies("@4.0.0:"): args.append("-DSKIP_MPI=%s" % ("YES" if "~mpi" in spec else "NO")) args.append("-DSKIP_OPENMP=%s" % ("YES" if "~openmp" in spec else "NO")) args.append("-DSKIP_FHAMCREST=%s" % ("YES" if "~fhamcrest" in spec else "NO")) args.append("-DSKIP_ESMF=%s" % ("YES" if "~esmf" in spec else "NO")) + args.append("-DMAX_ASSERT_RANK=%s" % spec.variants["max_array_rank"].value) else: + if spec.satisfies("%gcc@10:"): + args.append("-DCMAKE_Fortran_FLAGS_DEBUG=-g -O2 -fallow-argument-mismatch") + args.append(self.define_from_variant("MPI", "mpi")) args.append(self.define_from_variant("OPENMP", "openmp")) + args.append("-DMAX_RANK=%s" % spec.variants["max_array_rank"].value) + + if spec.satisfies("@:4.2.1") and spec.satisfies("%gcc@5:"): + # prevents breakage when max_array_rank is larger than default. Note + # that 4.0.0-4.2.1 still had a 512 limit + args.append("-DCMAKE_Fortran_FLAGS=-ffree-line-length-none") if spec.satisfies("+mpi"): args.extend( |