Skip to content

Commit

Permalink
Add catch2 test dependency for marlinutil and fccanalyses (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener authored Sep 18, 2023
1 parent b178fe0 commit 8fdf0d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/fccanalyses/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class Fccanalyses(CMakePackage, Key4hepPackage):
depends_on("py-pyyaml", type=("build", "run"))
depends_on("py-onnxruntime", when="+onnx")
depends_on("[email protected]:", when="@0.7.0:")
depends_on("catch2@3:", type=("test"), when="@0.4:")

def cmake_args(self):
args = [
Expand All @@ -85,6 +86,7 @@ def cmake_args(self):
self.define_from_variant("WITH_ACTS", "acts"),
self.define_from_variant("WITH_DD4HEP", "dd4hep"),
self.define_from_variant("WITH_ONNX", "onnx"),
self.define("BUILD_TESTING", self.run_tests),
]
return args

Expand Down
6 changes: 4 additions & 2 deletions packages/marlinutil/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ class Marlinutil(CMakePackage, Ilcsoftpackage):
depends_on("ced")
depends_on("dd4hep")
depends_on("root")
depends_on("catch2@3:", type=("test"), when="@1.17:")

def cmake_args(self):
spec = self.spec
cxxstd = spec["root"].variants["cxxstd"].value
# Make sure that we pick the right GSL
return [
"-DCMAKE_CXX_STANDARD={0}".format(cxxstd),
"-DGSL_DIR={}".format(self.spec["gsl"].prefix),
self.define("CMAKE_CXX_STANDARD", cxxstd),
self.define("GSL_DIR", self.spec["gsl"].prefix),
self.define("BUILD_TESTING", self.run_tests),
]

0 comments on commit 8fdf0d7

Please sign in to comment.