diff options
author | Tristan Carel <tristan.carel@protonmail.com> | 2023-03-31 17:27:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-31 11:27:58 -0400 |
commit | 3b5b9e847419fb1774fa165f5031598e169f5e1a (patch) | |
tree | 540c78f5fc21c62da6f1973b89ef303323fd53d2 /var/spack | |
parent | aabd76cb74b34c5d131917ceb331febc7487b415 (diff) | |
download | spack-3b5b9e847419fb1774fa165f5031598e169f5e1a.tar.gz spack-3b5b9e847419fb1774fa165f5031598e169f5e1a.tar.bz2 spack-3b5b9e847419fb1774fa165f5031598e169f5e1a.tar.xz spack-3b5b9e847419fb1774fa165f5031598e169f5e1a.zip |
steps: add variants gmsh and kokkos (#36543)
Diffstat (limited to 'var/spack')
-rw-r--r-- | var/spack/repos/builtin/packages/omega-h/package.py | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/omega-h/package.py b/var/spack/repos/builtin/packages/omega-h/package.py index 04d9570389..86c8993c06 100644 --- a/var/spack/repos/builtin/packages/omega-h/package.py +++ b/var/spack/repos/builtin/packages/omega-h/package.py @@ -51,10 +51,14 @@ class OmegaH(CMakePackage, CudaPackage): variant("optimize", default=True, description="Compile C++ with optimization") variant("symbols", default=True, description="Compile C++ with debug symbols") variant("warnings", default=False, description="Compile C++ with warnings") + variant("gmsh", default=False, description="Use Gmsh C++ API") + variant("kokkos", default=False, description="Use Kokkos") - depends_on("gmsh", when="+examples", type="build") + depends_on("gmsh", when="+examples") + depends_on("gmsh@4.4.1:", when="+gmsh") depends_on("mpi", when="+mpi") depends_on("trilinos +kokkos", when="+trilinos") + depends_on("kokkos", when="+kokkos") depends_on("zlib", when="+zlib") # Note: '+cuda' and 'cuda_arch' variants are added by the CudaPackage depends_on("cuda", when="+cuda") @@ -74,6 +78,12 @@ class OmegaH(CMakePackage, CudaPackage): # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610 conflicts("%gcc@8:8.2", when="@:9.22.1") + def patch(self): + if "@:9.34.8" in self.spec: + filter_file( + r"OUTPUT_QUIET", "OUTPUT_VARIABLE Gmsh_VERSION_STRING", "cmake/FindGmsh.cmake" + ) + def _bob_options(self): cmake_var_prefix = "Omega_h_CXX_" for variant in ["optimize", "symbols", "warnings"]: @@ -110,6 +120,10 @@ class OmegaH(CMakePackage, CudaPackage): args.append("-DOmega_h_USE_CUDA:BOOL=OFF") if "+trilinos" in self.spec: args.append("-DOmega_h_USE_Trilinos:BOOL=ON") + if "+gmsh" in self.spec: + args.append("-DOmega_h_USE_Gmsh:BOOL=ON") + if "+kokkos" in self.spec: + args.append("-DOmega_h_USE_Kokkos:BOOL=ON") if "+zlib" in self.spec: args.append("-DOmega_h_USE_ZLIB:BOOL=ON") args.append("-DZLIB_ROOT:PATH={0}".format(self.spec["zlib"].prefix)) @@ -123,9 +137,10 @@ class OmegaH(CMakePackage, CudaPackage): args.append("-DOmega_h_THROW:BOOL=ON") else: args.append("-DOmega_h_THROW:BOOL=OFF") - # omega-h requires empty CMAKE_BUILD_TYPE - args.append("-DCMAKE_BUILD_TYPE:STRING=") - args += list(self._bob_options()) + if "@:9.29.99" in self.spec: + # omega-h requires empty CMAKE_BUILD_TYPE + args.append("-DCMAKE_BUILD_TYPE:STRING=") + args += list(self._bob_options()) return args def flag_handler(self, name, flags): |