@@ -78,12 +78,14 @@ class Visit(CMakePackage):
7878 variant ("silo" , default = True , description = "Enable Silo file format" )
7979 variant ("python" , default = True , description = "Enable Python support" )
8080 variant ("mpi" , default = True , description = "Enable parallel engine" )
81+ variant ("vtkm" , default = False , description = "Enable VTK-m support" )
8182
8283 patch ("spack-changes-3.1.patch" , when = "@3.1.0:3.2.2" )
8384 patch ("spack-changes-3.0.1.patch" , when = "@3.0.1" )
8485 patch ("nonframework-qwt.patch" , when = "^qt~framework platform=darwin" )
8586 patch ("parallel-hdf5.patch" , when = "@3.0.1:3.2.2+hdf5+mpi" )
8687 patch ("parallel-hdf5-3.3.patch" , when = "@3.3.0:+hdf5+mpi" )
88+ patch ("cmake-findvtkh-3.3.patch" , when = "@3.3.0:+vtkm" )
8789
8890 # Fix pthread and librt link errors
8991 patch ("visit32-missing-link-libs.patch" , when = "@3.2" )
@@ -145,6 +147,14 @@ class Visit(CMakePackage):
145147 depends_on ("adios2+python" , when = "+adios2+python" )
146148 depends_on ("adios2~python" , when = "+adios2~python" )
147149
150+ # vtk-m also requires vtk-h. Disabling cuda since that requires
151+ # later versions of vtk-m and vtk-h. The patch prevents vtk-m from
152+ # throwing an exception whenever any vtk-m operations are performed.
153+ depends_on (
"[email protected] +testlib~cuda" ,
when = "+vtkm" )
154+ depends_on (
"[email protected] +shared~mpi~openmp~cuda" ,
when = "+vtkm" )
155+
156+ depends_on ("vtk-m" , patches = [patch ("vtk-m_transport_tag_topology_field_in.patch" )])
157+
148158 depends_on ("zlib" )
149159
150160 @when ("@3:,develop" )
@@ -268,6 +278,10 @@ def cmake_args(self):
268278 else :
269279 args .append (self .define ("VISIT_PARALLEL" , False ))
270280
281+ if "+vtkm" in spec :
282+ args .append (self .define ("VISIT_VTKM_DIR" , spec ["vtk-m" ].prefix ))
283+ args .append (self .define ("VISIT_VTKH_DIR" , spec ["vtk-h" ].prefix ))
284+
271285 return args
272286
273287 # https://spack.readthedocs.io/en/latest/packaging_guide.html?highlight=executables#making-a-package-discoverable-with-spack-external-find
0 commit comments