summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/acts/package.py63
1 files changed, 43 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py
index bcb4465c0a..a11e3d5638 100644
--- a/var/spack/repos/builtin/packages/acts/package.py
+++ b/var/spack/repos/builtin/packages/acts/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
-from spack.variant import _ConditionalVariantValues
class Acts(CMakePackage, CudaPackage):
@@ -33,7 +32,7 @@ class Acts(CMakePackage, CudaPackage):
homepage = "https://acts.web.cern.ch/ACTS/"
git = "https://github.com/acts-project/acts.git"
list_url = "https://github.com/acts-project/acts/releases/"
- maintainers("wdconinc")
+ maintainers("wdconinc", "stephenswat")
tags = ["hep"]
@@ -42,6 +41,8 @@ class Acts(CMakePackage, CudaPackage):
# Supported Acts versions
version("main", branch="main")
version("master", branch="main", deprecated=True) # For compatibility
+ version("36.1.0", commit="3f19d1a0eec1d11937d66d0ef603f0b25b9b4e96", submodules=True)
+ version("36.0.0", commit="6eca77c45b136861272694edbb61bb77200948a5", submodules=True)
version("35.2.0", commit="b3b09f46d064c43050dd3d21cdf51d7a412134fc", submodules=True)
version("35.1.0", commit="9dfb47b8edeb8b9c75115462079bcb003dd3f031", submodules=True)
version("35.0.0", commit="352b423ec31934f825deb9897780246d60ffc44e", submodules=True)
@@ -186,14 +187,18 @@ class Acts(CMakePackage, CudaPackage):
variant(
"benchmarks", default=False, description="Build the performance benchmarks", when="@0.16:"
)
- _cxxstd_values = (conditional("14", when="@:0.8.1"), "17", conditional("20", when="@24:"))
- variant(
- "cxxstd",
- default="17",
- values=_cxxstd_values,
- multi=False,
- description="Use the specified C++ standard when building.",
+ _cxxstd_values = (
+ conditional("14", when="@:0.8.1"),
+ conditional("17", when="@:35"),
+ conditional("20", when="@24:"),
)
+ _cxxstd_common = {
+ "values": _cxxstd_values,
+ "multi": False,
+ "description": "Use the specified C++ standard when building.",
+ }
+ variant("cxxstd", default="17", when="@:35", **_cxxstd_common)
+ variant("cxxstd", default="20", when="@36:", **_cxxstd_common)
variant(
"examples",
default=False,
@@ -219,6 +224,15 @@ class Acts(CMakePackage, CudaPackage):
default="MAX",
description="Log level above which examples should auto-crash",
)
+ _scalar_values = ["float", "double"]
+ variant(
+ "scalar",
+ default="double",
+ values=_scalar_values,
+ multi=False,
+ sticky=True,
+ description="Scalar type to use throughout Acts.",
+ )
# Variants that enable / disable Acts plugins
variant("alignment", default=False, description="Build the alignment package", when="@13:")
@@ -271,6 +285,7 @@ class Acts(CMakePackage, CudaPackage):
"tgeo", default=False, description="Build the TGeo plugin", when="@:34 +identification"
)
variant("tgeo", default=False, description="Build the TGeo plugin", when="@35:")
+ variant("traccc", default=False, description="Build the Traccc plugin", when="@35.1:")
# Variants that only affect Acts examples for now
variant(
@@ -329,21 +344,28 @@ class Acts(CMakePackage, CudaPackage):
depends_on("actsvg@0.4.35:", when="@28:")
depends_on("actsvg@0.4.39:", when="@32:")
depends_on("actsvg@0.4.40:", when="@32.1:")
+ depends_on("acts-algebra-plugins @0.24:", when="+traccc")
depends_on("autodiff @0.6:", when="@17: +autodiff")
depends_on("autodiff @0.5.11:0.5.99", when="@1.2:16 +autodiff")
depends_on("boost @1.62:1.69 +program_options +test", when="@:0.10.3")
depends_on("boost @1.71: +filesystem +program_options +test", when="@0.10.4:")
depends_on("cmake @3.14:", type="build")
+ depends_on("covfie @0.10:", when="+traccc")
+ depends_on("cuda @12:", when="+traccc")
depends_on("dd4hep @1.11: +dddetectors +ddrec", when="+dd4hep")
depends_on("dd4hep @1.21: +dddetectors +ddrec", when="@20: +dd4hep")
depends_on("dd4hep +ddg4", when="+dd4hep +geant4 +examples")
+ depends_on("detray @0.72.1:", when="+traccc")
depends_on("edm4hep @0.4.1:", when="+edm4hep")
depends_on("edm4hep @0.7:", when="@25: +edm4hep")
depends_on("eigen @3.3.7:", when="@15.1:")
depends_on("eigen @3.3.7:3.3.99", when="@:15.0")
+ depends_on("eigen @3.4:", when="@36.1:")
depends_on("geant4", when="+fatras_geant4")
depends_on("geant4", when="+geant4")
+ depends_on("geomodel +geomodelg4", when="+geomodel")
depends_on("geomodel @4.6.0:", when="+geomodel")
+ depends_on("geomodel @6.3.0:", when="+geomodel @36.1:")
depends_on("git-lfs", when="@12.0.0:")
depends_on("gperftools", when="+profilecpu")
depends_on("gperftools", when="+profilemem")
@@ -364,6 +386,7 @@ class Acts(CMakePackage, CudaPackage):
depends_on("py-onnxruntime@:1.12", when="+onnx @:23.2")
depends_on("py-onnxruntime@1.12:", when="+onnx @23.3:")
depends_on("py-pybind11 @2.6.2:", when="+python @18:")
+ depends_on("py-pybind11 @2.13.1:", when="+python @36:")
depends_on("py-pytest", when="+python +unit_tests")
with when("+tgeo"):
@@ -375,24 +398,22 @@ class Acts(CMakePackage, CudaPackage):
# ACTS imposes requirements on the C++ standard values used by ROOT
for _cxxstd in _cxxstd_values:
- if isinstance(_cxxstd, _ConditionalVariantValues):
- for _v in _cxxstd:
- depends_on(
- f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +geant4"
- )
- depends_on(
- f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +fatras_geant4"
- )
- depends_on(f"root cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +tgeo")
- else:
+ for _v in _cxxstd:
depends_on(f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +geant4")
depends_on(
f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +fatras_geant4"
)
- depends_on(f"root cxxstd={_cxxstd}", when=f"cxxstd={_cxxstd} +tgeo")
+ depends_on(f"root cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} +tgeo")
+
+ # When the traccc plugin is enabled, detray should match the Acts scalars
+ with when("+traccc"):
+ for _scalar in _scalar_values:
+ depends_on(f"detray scalar={_scalar}", when=f"scalar={_scalar}")
# ACTS has been using C++17 for a while, which precludes use of old GCC
conflicts("%gcc@:7", when="@0.23:")
+ # When using C++20, disable gcc 9 and lower.
+ conflicts("%gcc@:9", when="cxxstd=20")
def cmake_args(self):
spec = self.spec
@@ -458,10 +479,12 @@ class Acts(CMakePackage, CudaPackage):
plugin_cmake_variant("PODIO", "podio"),
example_cmake_variant("PYTHIA8", "pythia8"),
example_cmake_variant("PYTHON_BINDINGS", "python"),
+ self.define_from_variant("ACTS_CUSTOM_SCALARTYPE", "scalar"),
plugin_cmake_variant("ACTSVG", "svg"),
plugin_cmake_variant("SYCL", "sycl"),
plugin_cmake_variant("TGEO", "tgeo"),
example_cmake_variant("TBB", "tbb", "USE"),
+ plugin_cmake_variant("TRACCC", "traccc"),
cmake_variant(unit_tests_label, "unit_tests"),
]