From 8cc24fa20bb4b805d6bf0a854c15bd375e614c00 Mon Sep 17 00:00:00 2001 From: healther Date: Sat, 21 Apr 2018 17:26:37 +0200 Subject: add variant htmlreport to package cppcheck (#7824) Change-Id: I31766d3ceb4fa8852b9bdc82444e36514e760f4b --- var/spack/repos/builtin/packages/cppcheck/package.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cppcheck/package.py b/var/spack/repos/builtin/packages/cppcheck/package.py index ef8a849a1e..6286941b84 100644 --- a/var/spack/repos/builtin/packages/cppcheck/package.py +++ b/var/spack/repos/builtin/packages/cppcheck/package.py @@ -37,6 +37,10 @@ class Cppcheck(Package): version('1.72', '2bd36f91ae0191ef5273bb7f6dc0d72e') version('1.68', 'c015195f5d61a542f350269030150708') + variant('htmlreport', default=False, description="Install cppcheck-htmlreport") + + depends_on('py-pygments', when='+htmlreport', type='run') + def install(self, spec, prefix): # cppcheck does not have a configure script make("CFGDIR=%s" % os.path.join(prefix, 'cfg')) @@ -44,3 +48,5 @@ class Cppcheck(Package): mkdirp(prefix.bin) install('cppcheck', prefix.bin) shutil.copytree('cfg', os.path.join(prefix, 'cfg')) + if spec.satisfies('+htmlreport'): + install('htmlreport/cppcheck-htmlreport', prefix.bin) -- cgit v1.2.3-70-g09d2