PETSc: Explicitly point to cpp when configuring (#1807)
I encountered an HPC system where PETSc's configure stage does not find a valid `cpp` (C preprocessor). Explicitly pointing to Spack's `cpp` wrapper resolves the problem.
This commit is contained in:
		 Erik Schnetter
					Erik Schnetter
				
			
				
					committed by
					
						 Todd Gamblin
						Todd Gamblin
					
				
			
			
				
	
			
			
			 Todd Gamblin
						Todd Gamblin
					
				
			
						parent
						
							f180d748be
						
					
				
				
					commit
					00bac8f294
				
			| @@ -90,6 +90,8 @@ class Petsc(Package): | |||||||
|     def mpi_dependent_options(self): |     def mpi_dependent_options(self): | ||||||
|         if '~mpi' in self.spec: |         if '~mpi' in self.spec: | ||||||
|             compiler_opts = [ |             compiler_opts = [ | ||||||
|  |                 '--with-cpp=cpp', | ||||||
|  |                 '--with-cxxcpp=cpp', | ||||||
|                 '--with-cc=%s' % os.environ['CC'], |                 '--with-cc=%s' % os.environ['CC'], | ||||||
|                 '--with-cxx=%s' % (os.environ['CXX'] |                 '--with-cxx=%s' % (os.environ['CXX'] | ||||||
|                                    if self.compiler.cxx is not None else '0'), |                                    if self.compiler.cxx is not None else '0'), | ||||||
| @@ -111,6 +113,8 @@ def mpi_dependent_options(self): | |||||||
|                 raise RuntimeError('\n'.join(errors)) |                 raise RuntimeError('\n'.join(errors)) | ||||||
|         else: |         else: | ||||||
|             compiler_opts = [ |             compiler_opts = [ | ||||||
|  |                 '--with-cpp=cpp', | ||||||
|  |                 '--with-cxxcpp=cpp', | ||||||
|                 '--with-mpi=1', |                 '--with-mpi=1', | ||||||
|                 '--with-mpi-dir=%s' % self.spec['mpi'].prefix, |                 '--with-mpi-dir=%s' % self.spec['mpi'].prefix, | ||||||
|             ] |             ] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user