mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
tutorial updates to fix warnings and CMakeLists for optional tutorial build
This commit is contained in:
parent
524bc64520
commit
91a267eacc
@ -97,6 +97,7 @@ vtkm_option(VTKm_ENABLE_BENCHMARKS "Enable VTKm Benchmarking" OFF)
|
||||
vtkm_option(VTKm_ENABLE_MPI "Enable MPI support" OFF)
|
||||
vtkm_option(VTKm_ENABLE_DOCUMENTATION "Build Doxygen documentation" OFF)
|
||||
vtkm_option(VTKm_ENABLE_EXAMPLES "Build examples" OFF)
|
||||
vtkm_option(VTKm_ENABLE_TUTORIALS "Build tutorials" OFF)
|
||||
if (NOT DEFINED VTKm_ENABLE_TESTING)
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
vtkm_option(VTKm_ENABLE_TESTING "Enable VTKm Testing" ON)
|
||||
@ -408,4 +409,6 @@ endif()
|
||||
add_subdirectory(examples)
|
||||
|
||||
# Tutorial examples
|
||||
add_subdirectory(tutorial)
|
||||
if(VTKm_ENABLE_TUTORIALS)
|
||||
add_subdirectory(tutorial)
|
||||
endif()
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
#add the directory that contains the VTK-m config file to the cmake
|
||||
#path so that our examples can find VTK-m
|
||||
#Normally when running CMake, you need to set the VTKm_DIR to
|
||||
#find the VTKmConfig.cmake file. Because we already know where this
|
||||
#file is, we can add the location to look to CMAKE_PREFIX_PATH.
|
||||
|
||||
set(CMAKE_PREFIX_PATH ${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR})
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct ConvertPointFieldToCells : vtkm::worklet::WorkletVisitCellsWithPoints
|
||||
{
|
||||
outCellField = outCellField + inPointFieldVec[pointIndex];
|
||||
}
|
||||
outCellField = outCellField / OutCellFieldType(numPoints);
|
||||
outCellField = outCellField / static_cast<OutCellFieldType>(numPoints);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,7 @@ int main(int argc, char** argv)
|
||||
view.Paint();
|
||||
|
||||
//Saving View
|
||||
view.SaveAs("BasicRendering.ppm");
|
||||
view.SaveAs("BasicRendering.png");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user