From f670606b472db119b0420a98b3f7c3dd9a28caa5 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:21:21 +0100 Subject: [PATCH] Enable PandoraMonitoring and add variants for the packages that use it (#681) --- environments/key4hep-common/packages.yaml | 6 ++++++ packages/ddmarlinpandora/package.py | 7 +++++++ packages/ilcsoft/package.py | 1 + packages/larcontent/package.py | 10 +++++++++- packages/lccontent/package.py | 10 +++++++++- 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/environments/key4hep-common/packages.yaml b/environments/key4hep-common/packages.yaml index 16cdea1a..69587c5d 100644 --- a/environments/key4hep-common/packages.yaml +++ b/environments/key4hep-common/packages.yaml @@ -12,6 +12,8 @@ packages: buildable: true curl: require: +gssapi + ddmarlinpandora: + require: +monitoring dd4hep: require: +edm4hep+lcio+xercesc+hepmc3 gaudi: @@ -26,8 +28,12 @@ packages: hepmc3: require: +python+rootio # https://github.com/key4hep/key4hep-spack/issues/517 + larcontent: + require: +monitoring lccd: require: +conddbmysql + lccontent: + require: +monitoring llvm: variants: ~flang~lldb~lld~lua~mlir~internal_unwind~polly~libomptarget~libomptarget_debug~gold~split_dwarf~llvm_dylib~link_llvm_dylib~omp_tsan~omp_as_runtime~code_signing~python~version_suffix~shlib_symbol_version~z3~zstd compiler-rt="none" libcxx="none" targets="x86" marlin: diff --git a/packages/ddmarlinpandora/package.py b/packages/ddmarlinpandora/package.py index 44781db6..9563ef16 100644 --- a/packages/ddmarlinpandora/package.py +++ b/packages/ddmarlinpandora/package.py @@ -42,6 +42,13 @@ class Ddmarlinpandora(CMakePackage, Ilcsoftpackage): depends_on("larcontent") depends_on("dd4hep") depends_on("marlintrk") + depends_on("pandoramonitoring", when="+monitoring") + + variant("monitoring", default=False, description="Enable Pandora Monitoring") + + def setup_build_environment(self, env): + if "+monitoring" in self.spec: + env.set("PANDORA_MONITORING", "ON") def setup_run_environment(self, env): env.prepend_path("MARLIN_DLL", self.prefix.lib + "/libDDMarlinPandora.so") diff --git a/packages/ilcsoft/package.py b/packages/ilcsoft/package.py index 4c0c6310..44d51e08 100644 --- a/packages/ilcsoft/package.py +++ b/packages/ilcsoft/package.py @@ -79,6 +79,7 @@ class Ilcsoft(BundlePackage, Key4hepPackage): depends_on("marlinmlflavortagging") depends_on("overlay") depends_on("pandoraanalysis") + depends_on("pandoramonitoring") depends_on("pandorapfa") depends_on("physsim") depends_on("raida") diff --git a/packages/larcontent/package.py b/packages/larcontent/package.py index 5a69b540..1336ab44 100644 --- a/packages/larcontent/package.py +++ b/packages/larcontent/package.py @@ -39,10 +39,18 @@ class Larcontent(CMakePackage): depends_on("pandorasdk") depends_on("eigen") + depends_on("pandoramonitoring", when="+monitoring") + + variant("monitoring", default=False, description="Enable Pandora Monitoring") + + def setup_build_environment(self, env): + if "+monitoring" in self.spec: + env.set("PANDORA_MONITORING", "ON") + def cmake_args(self): args = [ "-DCMAKE_MODULE_PATH=%s" % self.spec["pandorapfa"].prefix.cmakemodules, - "-DCMAKE_CXX_FLAGS=-std=c++17 -Wno-error", + "-DCMAKE_CXX_FLAGS=-std=c++20 -Wno-error", ] return args diff --git a/packages/lccontent/package.py b/packages/lccontent/package.py index f8f59fb0..2deee98e 100644 --- a/packages/lccontent/package.py +++ b/packages/lccontent/package.py @@ -34,9 +34,17 @@ class Lccontent(CMakePackage): depends_on("pandorapfa") depends_on("pandorasdk") + depends_on("pandoramonitoring", when="+monitoring") + + variant("monitoring", default=False, description="Enable Pandora Monitoring") + + def setup_build_environment(self, env): + if "+monitoring" in self.spec: + env.set("PANDORA_MONITORING", "ON") + def cmake_args(self): args = [ - "-DCMAKE_CXX_STANDARD=17", + "-DCMAKE_CXX_STANDARD=20", "-DCMAKE_MODULE_PATH=%s" % self.spec["pandorapfa"].prefix.cmakemodules, "-DCMAKE_CXX_FLAGS=-Wno-error", ]