File indexing completed on 2026-05-30 08:04:16
0001
0002
0003
0004
0005 from spack_repo.builtin.build_systems.cmake import CMakePackage
0006 from spack_repo.builtin.build_systems.cuda import CudaPackage
0007
0008 from spack.package import *
0009
0010
0011 class Simphony(CMakePackage, CudaPackage):
0012 """GPU-Accelerated Optical Photon Simulation using NVIDIA OptiX"""
0013
0014 homepage = "https://github.com/bnlnpps/simphony"
0015 git = "https://github.com/bnlnpps/simphony.git"
0016 url = "https://github.com/BNLNPPS/simphony/archive/refs/tags/0.1.0.tar.gz"
0017
0018 license("Apache-2.0")
0019
0020 maintainers("plexoos")
0021
0022 tags = ["eic"]
0023
0024 version("main", branch="main")
0025 version("0.5.0", sha256="383219ef86d67d6c2f3d9c00259f7a97ac007be39e889cfa95ada25ca0999ecc")
0026 version("0.4.0", sha256="15c776e79c1e8eb256886753e6f093e909e9ac69a4591a18b48a754b233856e7")
0027 version("0.3.0", sha256="6aebeb9b4c3dd6bdd300898d7e35ea51c550ec6005d7aa4b83066fc06771a456")
0028 version("0.2.0", sha256="94b97cd31d76ea6167b5db13cf05a9718bfb5ccda942dabd25ddbb9fde871211")
0029 version("0.1.0", sha256="e587eefa90febcb84de2de666170a3fd4a2b53912099bf1625b6a41298e5be9a")
0030
0031 depends_on("cxx", type="build")
0032 depends_on("cmake@3.10:", type="build")
0033
0034 depends_on("cuda")
0035 depends_on("geant4")
0036 depends_on("glew")
0037 depends_on("glfw")
0038 depends_on("glm")
0039 depends_on("glu")
0040 depends_on("nlohmann-json")
0041 depends_on("mesa")
0042 depends_on("optix-dev")
0043 depends_on("openssl")
0044 depends_on("plog")
0045 depends_on("python")
0046
0047 conflicts("~cuda", msg="This package requires CUDA")
0048
0049 def setup_build_environment(self, env):
0050
0051
0052 if self.spec.satisfies("^glm@0.9.9:"):
0053 env.append_flags("CPPFLAGS", "-DGLM_ENABLE_EXPERIMENTAL")
0054
0055 def cmake_args(self):
0056 args = [self.define("BUILD_TESTING", self.spec.satisfies("@0.6:") and self.run_tests)]
0057 return args