Skip to content
Snippets Groups Projects
Commit 6a9f02c9 authored by Chris Green's avatar Chris Green Committed by Massimiliano Culpo
Browse files

cppunit: support cxxstd. (#10888)

parent f15f3076
No related branches found
No related tags found
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment