Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-05 08:15:11

0001 # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
0002 # Spack Project Developers. See the top-level COPYRIGHT file for details.
0003 #
0004 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 
0006 
0007 from spack.package import *
0008 
0009 
0010 class Afterburner(CMakePackage):
0011     """An EIC Monte Carlo Afterburner for beam effects."""
0012 
0013     homepage = "https://github.com/eic/afterburner"
0014     url = "https://github.com/eic/afterburner/archive/refs/tags/v0.1.2.tar.gz"
0015     list_url = "https://github.com/eic/afterburner/tags"
0016     git = "https://github.com/eic/afterburner"
0017 
0018     maintainers = ["wdconinc", "DraTeots"]
0019 
0020     tags = ["eic"]
0021 
0022     version("main", branch="main")
0023     version("0.1.3", sha256="765bbe5b9573967e1aeed276d45bd299f3cf52251b6ec9b42fff9e2229fee663")
0024     version(
0025         "0.1.2",
0026         sha256="4de4d8ce9f76830a1e1a2b4b680a78baa5ed2f28f1aaac4c0e861c48bbff259e",
0027     )
0028     version(
0029         "0.1.1",
0030         sha256="a29f576e11debeaa2e1a1da87eb51bd58281f7fd547906159e41aefc4635f265",
0031     )
0032     version(
0033         "0.1.0",
0034         sha256="2a4c083323ba43944ac1b5cae66f5b45205042cff0adb80506feb2b95a075179",
0035     )
0036     version(
0037         "0.0.2",
0038         sha256="7e4f8e601bdca3691725b3cc22e72409eb85e8a48852bdeed944590864339cb5",
0039     )
0040     version(
0041         "0.0.1",
0042         sha256="53ac535cc1bfed3dd9d482d942622a472617d4d53771d5cbc9da4feac071b770",
0043     )
0044 
0045     variant("root", default=False, description="Support reading ROOT files")
0046     variant("zlib", default=True, description="Support reading compressed files")
0047 
0048     depends_on("cxx", type="build")
0049 
0050     depends_on("gsl")
0051     depends_on("hepmc3")
0052     depends_on("clhep")
0053     depends_on("yaml-cpp")
0054     depends_on("root", when="+root")
0055     depends_on("zlib", when="+zlib")
0056 
0057     root_cmakelists_dir = "cpp"
0058 
0059     def patch(self):
0060         filter_file(
0061             r"add_subdirectory\(test\)", "#add_subdirectory(test)", "cpp/CMakeLists.txt"
0062         )
0063         filter_file(r"enable_testing\(\)", "#enable_testing()", "cpp/CMakeLists.txt")
0064 
0065     def cmake_args(self):
0066         if "+root" in self.spec:
0067             cxxstd = self.spec["root"].variants["cxxstd"].value
0068         else:
0069             cxxstd = "11"
0070         args = [self.define("CMAKE_CXX_STANDARD", cxxstd)]
0071         return args