[podio] fix root cxxstd dependency (#16708)

This commit is contained in:
vvolkl 2020-05-19 04:52:18 +02:00 committed by GitHub
parent 9d766ae1fa
commit 31ccf80294
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,17 +26,12 @@ class Podio(CMakePackage):
description='The build type to build',
values=('Debug', 'Release'))
variant('cxxstd',
default='17',
values=('14', '17'),
multi=False,
description='Use the specified C++ standard when building.')
# cpack config throws an error on some systems
patch('cpack.patch', when="@:0.10.0")
_cxxstd_values = ('14', '17')
for s in _cxxstd_values:
depends_on('root@6.08.06: cxxstd=' + s, when='cxxstd=' + s)
depends_on('root@6.08.06:')
depends_on('cmake', type='build')
depends_on('cmake@3.8:', type='build')
depends_on('python', type=('build', 'run'))
depends_on('py-pyyaml', type=('build', 'run'))
@ -44,8 +39,8 @@ def cmake_args(self):
args = []
# C++ Standard
args.append('-DCMAKE_CXX_STANDARD=%s'
% self.spec.variants['cxxstd'].value)
args.append('-DBUILD_TESTING=OFF')
% self.spec['root'].variants['cxxstd'].value)
args.append('-DBUILD_TESTING=%s' % self.run_tests)
return args
def setup_build_environment(self, spack_env):