add variant tests which can be one of (none, tests, benchmarks) (#17949)

This commit is contained in:
eugeneswalker 2020-08-09 11:40:46 -07:00 committed by GitHub
parent 5965522bbe
commit bad8734316
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,8 @@ class Umpire(CMakePackage, CudaPackage):
variant('openmp', default=False, description='Build with OpenMP support')
variant('deviceconst', default=False,
description='Enables support for constant device memory')
variant('tests', default='none', values=('none', 'basic', 'benchmarks'),
multi=False, description='Tests to run')
depends_on('cmake@3.8:', type='build')
depends_on('cmake@3.9:', when='+cuda', type='build')
@ -88,7 +90,10 @@ def cmake_args(self):
options.append('-DBUILD_SHARED_LIBS={0}'.format(
'On' if '+shared' in spec else 'Off'))
options.append('-DENABLE_BENCHMARKS={0}'.format(
'On' if 'tests=benchmarks' in spec else 'Off'))
options.append('-DENABLE_TESTS={0}'.format(
'On' if self.run_tests else 'Off'))
'Off' if 'tests=none' in spec else 'On'))
return options