summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhinav Bhatele <bhatele@gmail.com>2018-09-26 18:47:51 -0700
committerChristoph Junghans <christoph.junghans@gmail.com>2018-09-26 19:47:51 -0600
commit41b35a783e27650428261467f1d53675df2d8f72 (patch)
tree8c5f93cd48c5f97675eedb8b89a90768457f5536
parent2f28bd7d7ff40658dbc1095039ae4ac868195b6c (diff)
downloadspack-41b35a783e27650428261467f1d53675df2d8f72.tar.gz
spack-41b35a783e27650428261467f1d53675df2d8f72.tar.bz2
spack-41b35a783e27650428261467f1d53675df2d8f72.tar.xz
spack-41b35a783e27650428261467f1d53675df2d8f72.zip
fix build errors, make mpi variant default and add openmp variant (#9364)
-rw-r--r--var/spack/repos/builtin/packages/xsbench/package.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/xsbench/package.py b/var/spack/repos/builtin/packages/xsbench/package.py
index b46c828ba0..ebad0f683e 100644
--- a/var/spack/repos/builtin/packages/xsbench/package.py
+++ b/var/spack/repos/builtin/packages/xsbench/package.py
@@ -41,7 +41,8 @@ class Xsbench(MakefilePackage):
version('14', '94d5d28eb031fd4ef35507c9c1862169')
version('13', '72a92232d2f5777fb52f5ea4082aff37')
- variant('mpi', default=False, description='Build with MPI support')
+ variant('mpi', default=True, description='Build with MPI support')
+ variant('openmp', default=True, description='Build with OpenMP support')
depends_on('mpi', when='+mpi')
@@ -55,8 +56,11 @@ class Xsbench(MakefilePackage):
cflags = '-std=gnu99'
if '+mpi' in self.spec:
targets.append('CC={0}'.format(self.spec['mpi'].mpicc))
+ else:
+ targets.append('CC={0}'.format(self.compiler.cxx))
- cflags += ' ' + self.compiler.openmp_flag
+ if '+openmp' in self.spec:
+ cflags += ' ' + self.compiler.openmp_flag
targets.append('CFLAGS={0}'.format(cflags))
targets.append('LDFLAGS=-lm')