cppunit: support cxxstd. (#10888)
This commit is contained in:
parent
f15f3076db
commit
6a9f02c96f
@ -13,3 +13,15 @@ class Cppunit(AutotoolsPackage):
|
||||
url = "http://dev-www.libreoffice.org/src/cppunit-1.13.2.tar.gz"
|
||||
|
||||
version('1.13.2', '0eaf8bb1dcf4d16b12bec30d0732370390d35e6f')
|
||||
|
||||
variant('cxxstd',
|
||||
default='default',
|
||||
values=('default', '98', '11', '14', '17'),
|
||||
multi=False,
|
||||
description='Use the specified C++ standard when building.')
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
cxxstd = self.spec.variants['cxxstd'].value
|
||||
cxxstdflag = '' if cxxstd == 'default' else \
|
||||
getattr(self.compiler, 'cxx{0}_flag'.format(cxxstd))
|
||||
spack_env.append_flags('CXXFLAGS', cxxstdflag)
|
||||
|
Loading…
Reference in New Issue
Block a user