exago: query and use MPI compilers from spack (#33598)

* exago: query and use MPI compilers from spack

* exago: requires explicit location of mpi.h for nvcc
This commit is contained in:
Satish Balay 2022-10-31 09:03:26 -05:00 committed by GitHub
parent a4930c74cb
commit a93b3643c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,6 +136,17 @@ def cmake_args(self):
args = []
spec = self.spec
if "~mpi" in self.spec:
args.append(self.define("CMAKE_C_COMPILER", os.environ["CC"]))
args.append(self.define("CMAKE_CXX_COMPILER", os.environ["CXX"]))
else:
args.append(self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc))
args.append(self.define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx))
args.append(self.define("MPI_C_COMPILER", spec["mpi"].mpicc))
args.append(self.define("MPI_CXX_COMPILER", spec["mpi"].mpicxx))
if "+cuda" in spec:
args.append(self.define("MPI_CXX_HEADER_DIR", spec["mpi"].prefix.include))
# NOTE: If building with spack develop on a cluster, you may want to
# change the ctest launch command to use your job scheduler like so:
#