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
This commit is contained in:
		| @@ -113,20 +113,26 @@ def cmake_args(self): | |||||||
|             self.define_from_variant("BUILD_SHARED", "shared"), |             self.define_from_variant("BUILD_SHARED", "shared"), | ||||||
|             "-DCMAKE_Fortran_MODULE_DIRECTORY=%s" % spec.prefix.include, |             "-DCMAKE_Fortran_MODULE_DIRECTORY=%s" % spec.prefix.include, | ||||||
|             self.define_from_variant("BUILD_DOCS", "docs"), |             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:"): |         if spec.satisfies("@4.0.0:"): | ||||||
|             args.append("-DSKIP_MPI=%s" % ("YES" if "~mpi" in spec else "NO")) |             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_OPENMP=%s" % ("YES" if "~openmp" in spec else "NO")) | ||||||
|             args.append("-DSKIP_FHAMCREST=%s" % ("YES" if "~fhamcrest" 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("-DSKIP_ESMF=%s" % ("YES" if "~esmf" in spec else "NO")) | ||||||
|  |             args.append("-DMAX_ASSERT_RANK=%s" % spec.variants["max_array_rank"].value) | ||||||
|         else: |         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("MPI", "mpi")) | ||||||
|             args.append(self.define_from_variant("OPENMP", "openmp")) |             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"): |         if spec.satisfies("+mpi"): | ||||||
|             args.extend( |             args.extend( | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Bryce Allen
					Bryce Allen