pfunit: add max_array_rank=(int) variant (#15348)
* pfunit: add max_array_rank=(int) variant * pfunit: flake8 line length fixes
This commit is contained in:
		| @@ -30,10 +30,14 @@ class Pfunit(CMakePackage): | ||||
|     variant('shared', default=True, | ||||
|             description='Build shared library in addition to static') | ||||
|     variant('mpi', default=False, description='Enable MPI') | ||||
|     variant('use_comm_world', default=False, description='Enable MPI_COMM_WORLD for testing') | ||||
|     variant('use_comm_world', default=False, | ||||
|             description='Enable MPI_COMM_WORLD for testing') | ||||
|     variant('openmp', default=False, description='Enable OpenMP') | ||||
|     variant('docs', default=False, description='Build docs') | ||||
| 
 | ||||
|     variant('max_array_rank', values=int, default=5, | ||||
|             description='Max number of Fortran dimensions of array asserts') | ||||
| 
 | ||||
|     depends_on('python@2.7:', type=('build', 'run'))  # python3 too! | ||||
|     depends_on('mpi', when='+mpi') | ||||
| 
 | ||||
| @@ -53,7 +57,8 @@ def cmake_args(self): | ||||
|             '-DBUILD_SHARED=%s' % ('YES' if '+shared' in spec else 'NO'), | ||||
|             '-DCMAKE_Fortran_MODULE_DIRECTORY=%s' % spec.prefix.include, | ||||
|             '-DBUILD_DOCS=%s' % ('YES' if '+docs' in spec else 'NO'), | ||||
|             '-DOPENMP=%s' % ('YES' if '+openmp' in spec else 'NO')] | ||||
|             '-DOPENMP=%s' % ('YES' if '+openmp' in spec else 'NO'), | ||||
|             '-DMAX_RANK=%s' % spec.variants['max_array_rank'].value] | ||||
| 
 | ||||
|         if spec.satisfies('+mpi'): | ||||
|             args.extend(['-DMPI=YES', '-DMPI_USE_MPIEXEC=YES', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Bryce Allen
					Bryce Allen