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:
parent
a4930c74cb
commit
a93b3643c6
@ -136,6 +136,17 @@ def cmake_args(self):
|
|||||||
args = []
|
args = []
|
||||||
spec = self.spec
|
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
|
# 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:
|
# change the ctest launch command to use your job scheduler like so:
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user