hpx: simplify instrumentation_args function (#27226)
This commit is contained in:
parent
e13e697067
commit
e93a2db8b7
@ -51,9 +51,9 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
description='Max number of OS-threads for HPX applications',
|
description='Max number of OS-threads for HPX applications',
|
||||||
values=lambda x: isinstance(x, str) and x.isdigit())
|
values=lambda x: isinstance(x, str) and x.isdigit())
|
||||||
|
|
||||||
variant('instrumentation', values=any_combination_of(
|
instrumentation_values = ('apex', 'google_perftools', 'papi', 'valgrind')
|
||||||
'apex', 'google_perftools', 'papi', 'valgrind'
|
variant('instrumentation', values=any_combination_of(*instrumentation_values),
|
||||||
), description='Add support for various kind of instrumentation')
|
description='Add support for various kind of instrumentation')
|
||||||
|
|
||||||
variant(
|
variant(
|
||||||
"networking",
|
"networking",
|
||||||
@ -164,10 +164,7 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
|
|
||||||
def instrumentation_args(self):
|
def instrumentation_args(self):
|
||||||
args = []
|
args = []
|
||||||
for value in self.variants['instrumentation'][0].values:
|
for value in self.instrumentation_values:
|
||||||
if value == 'none':
|
|
||||||
continue
|
|
||||||
|
|
||||||
condition = 'instrumentation={0}'.format(value)
|
condition = 'instrumentation={0}'.format(value)
|
||||||
args.append(self.define(
|
args.append(self.define(
|
||||||
'HPX_WITH_{0}'.format(value.upper()), condition in self.spec
|
'HPX_WITH_{0}'.format(value.upper()), condition in self.spec
|
||||||
|
Loading…
Reference in New Issue
Block a user