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
This commit is contained in:
jeffmauldin 2024-09-13 05:36:49 -06:00 committed by GitHub
parent 7573ea2ae5
commit e3c5d5817b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -196,6 +196,11 @@ class Seacas(CMakePackage):
default=False, default=False,
description="Enable Faodel. See https://github.com/sandialabs/faodel", description="Enable Faodel. See https://github.com/sandialabs/faodel",
) )
variant(
"libcatalyst",
default=False,
description="Enable libcatalyst tpl (catalyst api 2); Kitware insitu library",
)
variant( variant(
"matio", "matio",
default=True, default=True,
@ -262,6 +267,10 @@ class Seacas(CMakePackage):
depends_on("catch2@3:", when="@2024-03-11:+tests") depends_on("catch2@3:", when="@2024-03-11:+tests")
depends_on("matio", when="+matio") 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") depends_on("libx11", when="+x11")
with when("+cgns"): with when("+cgns"):
@ -481,6 +490,9 @@ def cmake_args(self):
if "+adios2" in spec: if "+adios2" in spec:
options.append(define("ADIOS2_ROOT", spec["adios2"].prefix)) options.append(define("ADIOS2_ROOT", spec["adios2"].prefix))
if "+libcatalyst" in spec:
options.append(define("TPL_ENABLE_Catalyst2", "ON"))
# ################# RPath Handling ###################### # ################# RPath Handling ######################
if sys.platform == "darwin" and macos_version() >= Version("10.12"): if sys.platform == "darwin" and macos_version() >= Version("10.12"):
# use @rpath on Sierra due to limit of dynamic loader # use @rpath on Sierra due to limit of dynamic loader