Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:27:55

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