From d82bdb3bf774cd2d70cfa8c27a287b15fa388e74 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Thu, 28 Nov 2024 03:17:44 -0500 Subject: seacas: update recipe to find faodel (#40239) Explcitly sets the CMake variables Faodel_INCLUDE_DIRS and Faodel_LIBRARY_DIRS when +faodel. This seems to be needed for recent versions of seacas (seacas@2021-04-02:), but should be safe to do for all versions. For Faodel_INCLUDE_DIRS, it looks like Faodel has header files under $(Faodel_Prefix)/include/faodel, but seacas is not including the "faodel" part in #includes. So add both $(Faodel_Prefix)/include and $(Foadel_Prefix)/include/faodel Co-authored-by: payerle --- var/spack/repos/builtin/packages/seacas/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/seacas/package.py b/var/spack/repos/builtin/packages/seacas/package.py index a222024541..5204beeb05 100644 --- a/var/spack/repos/builtin/packages/seacas/package.py +++ b/var/spack/repos/builtin/packages/seacas/package.py @@ -304,6 +304,9 @@ class Seacas(CMakePackage): when="@:2023-10-24", ) + # Based on install-tpl.sh script, cereal seems to only be used when faodel enabled + depends_on("cereal", when="@2021-04-02: +faodel") + def setup_run_environment(self, env): env.prepend_path("PYTHONPATH", self.prefix.lib) @@ -486,6 +489,15 @@ class Seacas(CMakePackage): if pkg.lower() in spec: options.append(define(pkg + "_ROOT", spec[pkg.lower()].prefix)) + if "+faodel" in spec: + # faodel headers are under $faodel_prefix/include/faodel but seacas + # leaves off the faodel part + faodel_incdir = spec["faodel"].prefix.include + faodel_incdir2 = spec["faodel"].prefix.include.faodel + faodel_incdirs = [faodel_incdir, faodel_incdir2] + options.append(define("Faodel_INCLUDE_DIRS", ";".join(faodel_incdirs))) + options.append(define("Faodel_LIBRARY_DIRS", spec["faodel"].prefix.lib)) + options.append(from_variant("TPL_ENABLE_ADIOS2", "adios2")) if "+adios2" in spec: options.append(define("ADIOS2_ROOT", spec["adios2"].prefix)) -- cgit v1.2.3-70-g09d2