From e3c5d5817b02d91cdfacf0c2e939851956f5179a Mon Sep 17 00:00:00 2001 From: jeffmauldin Date: Fri, 13 Sep 2024 05:36:49 -0600 Subject: [PATCH] Seacas add libcatalyst variant 2 (#46339) * Update seacas package.py Adding libcatalyst variant to seacas package When seacas is installed with "seacas +libcatalyst" then a dependency on the spack package "libcatalyst" (which is catalyst api 2 from kitware) is added, and the appropriage cmake variable for the catalyst TPL is set. The mpi variant option in catalyst (i.e. build with mpi or build without mpi) is passed on to libcatalyst. The default of the libcatalyst variant is false/off, so if seacas is installed without the "+libcatalyst" in the spec it will behave exactly as it did before the introduction of this variant. * shortened line 202 to comply with < 100 characters per line style requirement --- var/spack/repos/builtin/packages/seacas/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/seacas/package.py b/var/spack/repos/builtin/packages/seacas/package.py index 7bcdc217366..a2220245419 100644 --- a/var/spack/repos/builtin/packages/seacas/package.py +++ b/var/spack/repos/builtin/packages/seacas/package.py @@ -196,6 +196,11 @@ class Seacas(CMakePackage): default=False, description="Enable Faodel. See https://github.com/sandialabs/faodel", ) + variant( + "libcatalyst", + default=False, + description="Enable libcatalyst tpl (catalyst api 2); Kitware insitu library", + ) variant( "matio", default=True, @@ -262,6 +267,10 @@ class Seacas(CMakePackage): depends_on("catch2@3:", when="@2024-03-11:+tests") depends_on("matio", when="+matio") + + depends_on("libcatalyst+mpi~python", when="+libcatalyst+mpi") + depends_on("libcatalyst~mpi~python", when="+libcatalyst~mpi") + depends_on("libx11", when="+x11") with when("+cgns"): @@ -481,6 +490,9 @@ def cmake_args(self): if "+adios2" in spec: options.append(define("ADIOS2_ROOT", spec["adios2"].prefix)) + if "+libcatalyst" in spec: + options.append(define("TPL_ENABLE_Catalyst2", "ON")) + # ################# RPath Handling ###################### if sys.platform == "darwin" and macos_version() >= Version("10.12"): # use @rpath on Sierra due to limit of dynamic loader