Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-30 07:48:31

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 from spack_repo.builtin.build_systems.cmake import CMakePackage
0009 
0010 
0011 class Afterburner(CMakePackage):
0012     """An EIC Monte Carlo Afterburner for beam effects."""
0013 
0014     homepage = "https://github.com/eic/afterburner"
0015     url = "https://github.com/eic/afterburner/archive/refs/tags/v0.1.2.tar.gz"
0016     list_url = "https://github.com/eic/afterburner/tags"
0017     git = "https://github.com/eic/afterburner"
0018 
0019     maintainers = ["wdconinc", "DraTeots"]
0020 
0021     tags = ["eic"]
0022 
0023     version("main", branch="main")
0024     version("0.2.0", sha256="6d18d1f111426fd7b6710f7883ee2574e9c31d9c0e90c997695ae61660e9f7c2")
0025     version(
0026         "0.1.3",
0027         sha256="765bbe5b9573967e1aeed276d45bd299f3cf52251b6ec9b42fff9e2229fee663",
0028     )
0029     version(
0030         "0.1.2",
0031         sha256="4de4d8ce9f76830a1e1a2b4b680a78baa5ed2f28f1aaac4c0e861c48bbff259e",
0032     )
0033     version(
0034         "0.1.1",
0035         sha256="a29f576e11debeaa2e1a1da87eb51bd58281f7fd547906159e41aefc4635f265",
0036     )
0037     version(
0038         "0.1.0",
0039         sha256="2a4c083323ba43944ac1b5cae66f5b45205042cff0adb80506feb2b95a075179",
0040     )
0041     version(
0042         "0.0.2",
0043         sha256="7e4f8e601bdca3691725b3cc22e72409eb85e8a48852bdeed944590864339cb5",
0044     )
0045     version(
0046         "0.0.1",
0047         sha256="53ac535cc1bfed3dd9d482d942622a472617d4d53771d5cbc9da4feac071b770",
0048     )
0049 
0050     variant("root", default=False, description="Support reading ROOT files")
0051     variant("zlib", default=True, description="Support reading compressed files")
0052 
0053     depends_on("c", type="build", when="@:0.1.3")
0054     depends_on("cxx", type="build")
0055 
0056     depends_on("gsl")
0057     depends_on("hepmc3")
0058     depends_on("clhep")
0059     depends_on("yaml-cpp")
0060     depends_on("root", when="+root")
0061     depends_on("zlib", when="+zlib")
0062 
0063     root_cmakelists_dir = "cpp"
0064 
0065     def patch(self):
0066         filter_file(
0067             r"add_subdirectory\(test\)", "#add_subdirectory(test)", "cpp/CMakeLists.txt"
0068         )
0069         filter_file(r"enable_testing\(\)", "#enable_testing()", "cpp/CMakeLists.txt")
0070 
0071     def cmake_args(self):
0072         if "+root" in self.spec:
0073             cxxstd = self.spec["root"].variants["cxxstd"].value
0074         else:
0075             cxxstd = "11"
0076         args = [self.define("CMAKE_CXX_STANDARD", cxxstd)]
0077         return args