paraview: add cdi support (#44222)
* add basic CDI package * add CDI variant to paraview * [@spackbot] updating style on behalf of albestro --------- Co-authored-by: albestro <albestro@users.noreply.github.com>
This commit is contained in:
parent
093b273f5c
commit
9a16927993
30
var/spack/repos/builtin/packages/cdi/package.py
Normal file
30
var/spack/repos/builtin/packages/cdi/package.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Cdi(AutotoolsPackage):
|
||||
"""
|
||||
CDI is a C and Fortran Interface to access Climate and NWP model Data.
|
||||
Supported data formats are GRIB, netCDF, SERVICE, EXTRA and IEG.
|
||||
"""
|
||||
|
||||
homepage = "https://code.mpimet.mpg.de/projects/cdi"
|
||||
url = "https://code.mpimet.mpg.de/attachments/download/29309/cdi-2.4.0.tar.gz"
|
||||
|
||||
version("2.4.0", sha256="91fca015b04c6841b9eab8b49e7726d35e35b9ec4350922072ec6e9d5eb174ef")
|
||||
|
||||
variant(
|
||||
"netcdf", default=True, description="This is needed to read/write NetCDF files with CDI"
|
||||
)
|
||||
|
||||
depends_on("netcdf-c", when="+netcdf")
|
||||
|
||||
def configure_args(self):
|
||||
args = []
|
||||
if "+netcdf" in self.spec:
|
||||
args.append("--with-netcdf=" + self.spec["netcdf-c"].prefix)
|
||||
return args
|
@ -88,6 +88,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
|
||||
variant("adios2", default=False, description="Enable ADIOS2 support", when="@5.8:")
|
||||
variant("visitbridge", default=False, description="Enable VisItBridge support")
|
||||
variant("raytracing", default=False, description="Enable Raytracing support")
|
||||
variant("cdi", default=False, description="Enable CDI support")
|
||||
variant(
|
||||
"openpmd",
|
||||
default=False,
|
||||
@ -234,6 +235,8 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("openimagedenoise", when="+raytracing")
|
||||
depends_on("ospray +mpi", when="+raytracing +mpi")
|
||||
|
||||
depends_on("cdi", when="+cdi")
|
||||
|
||||
depends_on("bzip2")
|
||||
depends_on("double-conversion")
|
||||
depends_on("expat")
|
||||
@ -706,6 +709,10 @@ def use_x11():
|
||||
cmake_args.append(self.define_from_variant("VTK_ENABLE_OSPRAY", "raytracing"))
|
||||
cmake_args.append(self.define_from_variant("VTKOSPRAY_ENABLE_DENOISER", "raytracing"))
|
||||
|
||||
# CDI
|
||||
cmake_args.append(self.define_from_variant("PARAVIEW_PLUGIN_ENABLE_CDIReader", "cdi"))
|
||||
cmake_args.append(self.define_from_variant("PARAVIEW_PLUGIN_AUTOLOAD_CDIReader", "cdi"))
|
||||
|
||||
return cmake_args
|
||||
|
||||
def test_smoke_test(self):
|
||||
|
Loading…
Reference in New Issue
Block a user