File indexing completed on 2025-07-26 08:11:18
0001 from spack.package import *
0002 from spack.pkg.builtin.rivet import Rivet as BuiltinRivet
0003
0004
0005 class Rivet(BuiltinRivet):
0006 with when("@4.1:"):
0007 variant("plugin-match", default="none", multi=True, description="List of Rivet analyses to be included")
0008 variant("plugin-unmatch", default="none", multi=True, description="List of Rivet analyses to be excluded")
0009
0010 def cmake_args(self):
0011 args = super().cmake_args()
0012
0013 if "plugin-match" in self.spec.variants:
0014 val = self.spec.variants["plugin-match"].value
0015 if "none" not in val:
0016 args += [f"--with-plugin-match={' '.join(val)}"]
0017
0018 if "plugin-unmatch" in self.spec.variants:
0019 val = self.spec.variants["plugin-unmatch"].value
0020 if "none" not in val:
0021 args += [f"--with-plugin-unmatch={' '.join(val)}"]
0022
0023 return args