summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/caffe/package.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/caffe/package.py b/var/spack/repos/builtin/packages/caffe/package.py
index 7df83b1d53..187bdc5764 100644
--- a/var/spack/repos/builtin/packages/caffe/package.py
+++ b/var/spack/repos/builtin/packages/caffe/package.py
@@ -81,4 +81,10 @@ class Caffe(CMakePackage):
version = spec['python'].version.up_to(1)
args.append('-Dpython_version=%s' % version)
+ if spec['hdf5'].satisfies('+mpi'):
+ args.extend([
+ '-DCMAKE_C_COMPILER={0}'.format(self.spec['mpi'].mpicc),
+ '-DCMAKE_CXX_COMPILER={0}'.format(self.spec['mpi'].mpicxx)
+ ])
+
return args