xsbench: fix build of v19 (#15715)

* xsbench: fix build of v19

* Flake8
This commit is contained in:
Christoph Junghans 2020-03-28 08:11:37 -06:00 committed by GitHub
parent 27e4a4750d
commit 0b1c0bdd6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,12 @@ class Xsbench(MakefilePackage):
depends_on('mpi', when='+mpi')
build_directory = 'src'
@property
def build_directory(self):
if self.spec.satisfies('@:18'):
return 'src'
else:
return 'openmp-threading'
@property
def build_targets(self):
@ -50,4 +55,5 @@ def build_targets(self):
def install(self, spec, prefix):
mkdir(prefix.bin)
install('src/XSBench', prefix.bin)
with working_dir(self.build_directory):
install('XSBench', prefix.bin)