diff options
author | Chris Green <greenc@fnal.gov> | 2019-03-14 10:17:31 -0500 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2019-03-14 16:17:31 +0100 |
commit | 6a9f02c96f4cfb6a6b95c31b81e0ef773d3051c8 (patch) | |
tree | 4efa27afd94e297d98bfdd8455062fdccf05765a | |
parent | f15f3076db24c31131e8207397258b15c5cc8f4e (diff) | |
download | spack-6a9f02c96f4cfb6a6b95c31b81e0ef773d3051c8.tar.gz spack-6a9f02c96f4cfb6a6b95c31b81e0ef773d3051c8.tar.bz2 spack-6a9f02c96f4cfb6a6b95c31b81e0ef773d3051c8.tar.xz spack-6a9f02c96f4cfb6a6b95c31b81e0ef773d3051c8.zip |
cppunit: support cxxstd. (#10888)
-rw-r--r-- | var/spack/repos/builtin/packages/cppunit/package.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cppunit/package.py b/var/spack/repos/builtin/packages/cppunit/package.py index a7edc3a6f6..87bf15121a 100644 --- a/var/spack/repos/builtin/packages/cppunit/package.py +++ b/var/spack/repos/builtin/packages/cppunit/package.py @@ -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) |