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